Skip to content

Commit 9987764

Browse files
committed
release: 0.0.85 — descriptor grammar v2, xpkg parse, scan_overrides, ddi audit, index floor
Version bump (mcpp.toml + MCPP_VERSION) and docs: [scan_overrides] section in 05-mcpp-toml.md. One-time compatibility note for release notes: mcpp-index will declare min_mcpp = 0.0.85 (index.toml floor) and start using long-bracket descriptors + scan_overrides; pre-0.0.85 binaries reading those descriptors fail to parse them — upgrade via install.sh. From 0.0.85 on, the floor mechanism turns every future evolution into a graceful keep-old-snapshot + upgrade hint instead of a parse error.
1 parent 94e4c6b commit 9987764

3 files changed

Lines changed: 41 additions & 2 deletions

File tree

docs/05-mcpp-toml.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,45 @@ features = {
439439
}
440440
```
441441

442+
### 2.8.3 `[scan_overrides."<glob>"]` — Author-Asserted Scan Results
443+
444+
The default module scanner is a text-level pass that (deliberately) rejects
445+
`import` statements inside conditional preprocessor blocks. Some legitimate
446+
module units carry them — e.g. fmt's official `src/fmt.cc` guards
447+
`import std;` behind `#ifdef FMT_IMPORT_STD`. When the file's import set is
448+
known and stable, declare it instead of scanning:
449+
450+
```toml
451+
[modules]
452+
sources = ["src/**/*.cppm", "vendor/fmt.cc"]
453+
454+
[scan_overrides."vendor/fmt.cc"]
455+
provides = ["fmt"] # at most one provided module per unit
456+
imports = ["std"]
457+
```
458+
459+
Files matched by the glob skip the text scan; the declared unit enters the
460+
module graph directly. The declaration is **audited every build**: the
461+
compiler's own P1689 scan of the file (the `.ddi` dyndep input) is compared
462+
against it, and any divergence fails that compile edge with both sides
463+
printed — a stale declaration cannot silently corrupt the graph. An override
464+
glob that matches no source file is an error.
465+
466+
The same key exists in xpkg descriptors (index packages):
467+
468+
```lua
469+
mcpp = {
470+
sources = { "*/src/fmt.cc" },
471+
cxxflags = { "-DFMT_IMPORT_STD" },
472+
scan_overrides = {
473+
["*/src/fmt.cc"] = { provides = { "fmt" }, imports = { "std" } },
474+
},
475+
}
476+
```
477+
478+
To extend the plan-vs-ddi audit to *every* module unit (not just overrides),
479+
set `MCPP_VERIFY_MODGRAPH=1` when generating the build.
480+
442481
### 2.9 `[profile.<name>]` — Build Profiles
443482

444483
```toml

mcpp.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mcpp"
3-
version = "0.0.84"
3+
version = "0.0.85"
44
description = "Modern C++ build & package management tool"
55
license = "Apache-2.0"
66
authors = ["mcpp-community"]

src/toolchain/fingerprint.cppm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import mcpp.toolchain.detect;
1818

1919
export namespace mcpp::toolchain {
2020

21-
inline constexpr std::string_view MCPP_VERSION = "0.0.84";
21+
inline constexpr std::string_view MCPP_VERSION = "0.0.85";
2222

2323
struct FingerprintInputs {
2424
Toolchain toolchain;

0 commit comments

Comments
 (0)