You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 71dcfb6
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: .agents/docs/2026-09-26-compile-database-and-issue-699-design.md
+46-2Lines changed: 46 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
subject: design
3
-
status: active
3
+
status: landed
4
4
---
5
5
6
6
# The compile database, `emit build-database`, and #701/#702: triage against the specifications, and one design
@@ -33,7 +33,7 @@ status: active
33
33
store path; toolchains llvm@22.1.8, llvm@20.1.7, gcc@16.1.0; clangd and clang-tidy 22.1.8; CMake
34
34
4.4.2. Every project is a copy or a fixture in a scratch directory. Appendix A holds the
35
35
readings.
36
-
- Status: accepted; implemented in #702 (§11).
36
+
- Status: landed in mcpp 2026.9.26.2 through #702 (§11, §12).
37
37
- Revision 1 (2026-09-26): the triage and the first design.
38
38
- Revision 2 (2026-09-26): D1 and D3 accepted; mcppls named as the primary consumer; C3
39
39
measured against the specification and three build systems; C5 rewritten around its four
@@ -45,6 +45,8 @@ status: active
45
45
reused as the single pull request (§7).
46
46
- Revision 4 (2026-09-26): D9 to D12 accepted; the implementation plan, its task
47
47
dependencies and the cross-repository sequence (§11).
48
+
- Revision 5 (2026-09-26): implemented in #702 as mcpp 2026.9.26.2; what the implementation
49
+
changed or added to the design, and the tests (§12).
48
50
49
51
---
50
52
@@ -839,6 +841,48 @@ open measurements. F1 is POSIX-only. E1 to E3 do not depend on the platform.
839
841
| Consistency | SPEC-004, SPEC-005, SPEC-007, docs/01, docs/04, docs/30, docs/31, docs/50 and their zh pairs change in the same pull request as the code |
840
842
| Test coverage | each item has a criterion that fails on 2026.9.26.1 or states a new property; the full e2e suite runs on the integration branch before the pull request is pushed |
841
843
844
+
## 12. Implementation record
845
+
846
+
The version is 2026.9.26.2, the next date version on the day of the release; #702 was opened as
847
+
2026.9.27.1. Four worktrees implemented T1 to T5 in parallel from #702's head and merged into it.
848
+
849
+
### 12.1 Where the implementation departs from or adds to the design
850
+
851
+
| Item | Design | Implementation | Reason |
852
+
|---|---|---|---|
853
+
| C5 (W3) | the plan carries the standard-library description |`recover_invocation` moved from `build_database.cppm` to `plan.cppm`, re-exported under its old name |`compile_commands.cppm` must render the units for the build's own database and cannot import `build_database.cppm`, which imports it |
854
+
| C4 (W2) | the flag for every dialect, MSVC after a measurement | GCC and Clang dialects; MSVC omitted, stated in SPEC-005 R3.7 | the measurement of clang-cl-mode clangd remains open (§9) |
855
+
| §3.2 item 4 | the fast path restores the root file | one function publishes the root file on both paths, comparing bytes; one function words the warning | a record of size and time would be a second definition of "identical" |
856
+
| P, post-condition | the directory exists | the directory holds at least one file other than the action's stamps | ninja creates a declared output's parent before the command runs, so a stamp inside the directory made "exists" true for a command that wrote nothing (e2e 791 checks both placements) |
857
+
| P, ordering | the declaring package's compile and link edges | the declaring package's compile edges and every link edge of the plan except static archives | the link-global directives of every package merge into one `LinkIntent`, which every link line reads |
858
+
| P, refusal | unknown roles refused | also a `prepare` action without `output_dir`| the post-condition has nothing to check without it |
859
+
| W, inputs | the program and the `prepare` stamps; depfile | the same, and the stamp records the names placed, which the next run resolves outside the program's directory (`ClosureReadInput::notInFirstDir`) | without the stamps a DLL a `prepare` action replaced was placed one build late; without the record, the copy beside the program shadowed the newer DLL (both found by e2e 797) |
860
+
| W, deploy edges | nothing else changes | a deployed DLL is an order-only input of the link, not an implicit one | the linker reads the import library; the plan-time listing of runtime search directories, kept for one train, otherwise relinked the program on the second build |
861
+
| F1 | SPEC-004 §8 for link flags | also: dependency flags propagate word by word; the link directives spell paths as one word; the first plan names an element whose words changed | the renderer, the propagation and the directives are three writers of one list |
862
+
| Cache | none stated | build-program cache epoch 3 | a cached `ldflag` value and a cached unknown role both change meaning |
863
+
| S2 | one sentence in §3.4 | S2 0.3.0: `data` with `error` diagnostics, optional `path`, S2-3.4-12 and S2-3.4-13 |Sunrisepeak/mcpp-language-server#25|
864
+
865
+
### 12.2 Tests
866
+
867
+
| Item | e2e | Fails on 2026.9.26.1 | CI |
868
+
|---|---|---|---|
869
+
| C1 | 781 | yes | shards |
870
+
| C2 | 782, 783 | yes | shards; 783 in the llvm job |
871
+
| C3 | 784, 211 | yes (gcc row) | llvm job |
872
+
| C4 | 785 | yes | llvm job |
873
+
| C5, D5b | 786, 688 | yes | llvm job; shards |
874
+
| E1, E2, E3 | 787, 788, 789 | yes | shards |
875
+
| R1' | 779 (Linux), 794 (Windows), 796 (mingw-cross, wine) | new surface | shards; Windows shards; mingw-cross job |
876
+
| R2 | 780 | yes | shards |
877
+
| P | 790, 791, 792, 793 | new surface | shards |
878
+
| F1 | 795 | yes | shards |
879
+
| W | 797 | new surface | mingw-cross job |
880
+
881
+
Unit tests: `test_compile_commands` (the merge key, `directory`, the flag position),
882
+
`test_build_directives` (the directive, the roles, `output_dir`, the cache round trip),
883
+
`test_ninja_backend` (the placement edge, its absence off PE and without directories, the
884
+
order-only deployed DLLs).
885
+
842
886
## Appendix A. Measurement record
843
887
844
888
All runs use `~/.xlings/data/xpkgs/xim-x-mcpp/2026.9.26.1/bin/mcpp`, clangd and clang-tidy from
Copy file name to clipboardExpand all lines: .agents/docs/README.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ superseded_by: 2026-09-07-....md # when status is superseded
18
18
---
19
19
```
20
20
21
-
310 records.
21
+
311 records.
22
22
23
23
## By subject
24
24
@@ -30,6 +30,7 @@ Records that declare one. Everything else is listed by date below.
30
30
31
31
### design
32
32
33
+
-[The compile database, `emit build-database`, and #701/#702: triage against the specifications, and one design](2026-09-26-compile-database-and-issue-699-design.md) — landed
33
34
-[Issues #693 to #696: triage against mcpp's contracts, and one repair plan](2026-09-25-issues-693-696-triage-and-repair-plan.md) — landed
34
35
-[Workspace inheritance, flag scoping and the published form: a unified repair plan (#690)](2026-09-25-issue-690-workspace-build-inheritance-consistency.md) — landed
35
36
-[MSVC toolset 的选择、#685、#687 与工具链管理规范:总体设计](2026-09-24-toolchain-selection-and-payload-trust-design.md) — active
@@ -101,6 +102,7 @@ Records that declare one. Everything else is listed by date below.
101
102
102
103
### 2026-09
103
104
105
+
-[The compile database, `emit build-database`, and #701/#702: triage against the specifications, and one design](2026-09-26-compile-database-and-issue-699-design.md) — landed
104
106
-[Issues #693 to #696: triage against mcpp's contracts, and one repair plan](2026-09-25-issues-693-696-triage-and-repair-plan.md) — landed
105
107
-[Workspace inheritance, flag scoping and the published form: a unified repair plan (#690)](2026-09-25-issue-690-workspace-build-inheritance-consistency.md) — landed
106
108
-[#690: self-review before release, engine and ecosystem](2026-09-25-issue-690-self-review.md) — landed
0 commit comments