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
feat(emit): baseline and local arguments, private, and config-files
The S1 SHOULD fields the lsp-mcpp validator reads, with values the plan
determines:
- `baseline-arguments` and `local-arguments`. A unit's arguments are its
driver, the set's baseline, its local arguments and its own trailing
`-c <source> -o <object>`, whose operands name the unit's source and object
from its work directory. The baseline is the longest prefix every unit of
the set shares; a prefix keeps argument order, which decides include search
and macro definitions.
- `private` is false: every module is visible to every set.
- `config-files` lists what the driver reads without being named: the clang
`<driver>.cfg` of resolve_clang_driver unless the units pass
`--no-default-config`, and GCC's `lib/gcc/<triple>/<version>/specs`
(or the major version) beside the driver.
e2e 688 gains J (the decomposition, private, config-files) and K (the
discovered test's imports inside a comment and a raw string are not
`requires`); its F mapping compares paths with one separator, and the
fixture's main.cpp is well-formed. SPEC-005 R3.2a, R3.6, R3.8 and R3.9a state
the rules.
Refs #636
Copy file name to clipboardExpand all lines: .agents/docs/2026-09-14-636-build-database-and-the-latest-xlings.md
+14-1Lines changed: 14 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -305,18 +305,31 @@ guarantee covers mcpp's writes. A build program that writes outside
305
305
306
306
| S1 | from | note |
307
307
|---|---|---|
308
-
| toolchain id |`<compiler_name>-<version>-<targetTriple>`||
308
+
| toolchain id |`<compiler_family>-<version>-<triple>`, the triple as the compiler spells it | opaque to a consumer; `llvm`, as in `llvm@22.1.8`|
309
309
|`family`|`Toolchain::compiler_name()` (`modules/toolchain-model/src/model.cppm:261-268`): `gcc`, `clang`, `msvc`| not `compiler_family()`, which answers `llvm`|
|`stdlib`|`name` and `version` from `stdlibId` and `stdlibVersion`; no `module-metadata`| std resolves through units (next row) |
312
+
|`config-files`| clang: the `<driver>.cfg` of `resolve_clang_driver`, unless the units pass `--no-default-config`; GCC: `lib/gcc/<targetTriple>/<version or major>/specs` beside the driver | read from the layout the driver searches; no driver is run |
312
313
| set `mcpp:std`| units for `stdModuleSource` and `stdCompatSource`, carrying the commands of 5.3 (3) | One rule for GCC's `bits/std.cc`, libc++'s `std.cppm`, MSVC's `std.ixx` and a package's own `std.cppm`; S1 §6.1 lets units outrank a manifest. `mcpp:` is the engine's reserved namespace (SPEC-002), so the name cannot collide with a package. |
313
314
| sets | one per package; test targets' sources in `<package>:test`|`family-name` is the package; `ide.configuration` is `BuildContext::profile`; `ide.kind` comes from the package's declared targets |
314
315
|`visible-sets`| every other set | The engine resolves imports over one flat graph per invocation (`scanner.cppm:1289-1319`). A narrower closure would describe a rule the build does not enforce; if the engine later refuses undeclared imports, the database inherits it. |
315
316
| units | every `CompileUnit` except NASM units, as in the CDB (`compile_commands.cppm:225-228`) | rendered from the record of 5.3 (4) |
317
+
|`baseline-arguments`, `local-arguments`| a unit's arguments are its driver, the set's baseline, its local arguments and its own `-c <source> -o <object>`; the baseline is the longest prefix every unit of the set shares | a prefix keeps argument order, which decides include search and macro definitions; a common subset would not |
318
+
|`private`|`false`| every module is visible to every set, as the `visible-sets` row states |
316
319
|`provides`|`providesModule` mapped to `""`| S1-8-6 permits an empty path for a producer that performs no build |
317
320
|`requires`|`imports`| partitions are already written in full |
318
321
|`ide.role`| the declaration form of 5.3 (5) |`unknown` for `scan_overrides` units |
319
322
323
+
A target's entry source that no `sources` glob matched (a discovered test, a
324
+
`main` outside the globs) had its imports read from line-leading `import` alone,
325
+
so an import in a comment or a raw string was planned as one. Validating the
326
+
lsp-mcpp repository's own database against S1 found it: its scanner test
327
+
required three modules no source provides. The entry is now read by the
328
+
scanner (`scan_entry_file`); a file the scanner refuses, which this path never
329
+
refused, keeps its line-leading imports with the role `unknown`. The standard
330
+
library check before planning reads entries the same way, so the two cannot
331
+
disagree about `import std`.
332
+
320
333
### 5.5 `watch` and `inputs-fingerprint`
321
334
322
335
-`watch` lists what the resolution read and a user edits: the manifests of the
0 commit comments