Hotfix: database_info mapper and repository use their own namespace

Table of Contents

This page documents a story in Sprint 25. It captures the goal, current status, acceptance criteria, and the tasks that compose it.

1. Goal

Restore the Windows MSVC build for ores.database. Remove the self-referential using-directive from database_info_mapper.cpp and database_info_repository.cpp, and stop the codegen templates from emitting it for the database component.

2. Status

Field Value
State DONE
Parent sprint Sprint 25
Now Nothing.
Waiting on Nothing.
Next Nothing.
Last touched 2026-09-21

3. Acceptance

  • ores.database compiles on Windows MSVC with /WX and no C4515 warning.
  • The codegen templates omit the self-referential using-directive for the database component and leave all other components byte-identical.

4. Tasks

Task State Start End Description
Scaffold story: Hotfix: database_info mapper and repository use their own namespace DONE 2026-09-21 2026-09-21 Story scaffolding rides this task: documents, sprint wiring, and the scaffold PR. Close it before merging that PR.
Implement Hotfix: database_info mapper and repository use their own namespace DONE 2026-09-21 2026-09-21 Initial task for: Hotfix: database_info mapper and repository use their own namespace

5. Decisions

  • The directive is redundant, so removing it is behaviour-preserving under any conforming compiler. No suppression of C4515 was needed.
  • The guard keys on the component, not on the file: the database component alone omits the directive, so no other component's generated output changes. Regenerating ores.refdata.asset_class_code confirmed zero diff.
  • The two database_info files are generated, but the model that drives them is stale and fails current validation. The generated files were corrected by hand to match the guarded template, and the model was left for a follow-up.
  • MSVC-only validation was accepted as deferred: no Windows build runs on pull requests, so the next scheduled Windows run covers the fix after merge.

6. Out of scope

  • Repairing the stale database_info model so codegen can regenerate it.

7. Result

The Windows MSVC build failure for ores.database is fixed. The self-referential using-directive is gone from both database_info files, and the codegen templates no longer emit it for the database component.

Landed in PR #2119 as three commits: the fix, the PR record, and the regression test. ores.database.lib builds green, the codegen suite passes 402 tests, and non-database regeneration is byte-identical.

One acceptance check is verified by construction rather than observation: C4515 is MSVC-only, so no local run can show it, and the Continuous Windows workflow runs on a schedule instead of per pull request. Its next run after the merge is the first real MSVC check of this fix.

Emacs 29.3 (Org mode 9.6.15)