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 3fb2d0c
Browse filesBrowse the repository at this point in the historyBrowse files
fix: spell every ${mcpp.*} path token generically (#393) (#801)
An action's `${mcpp.out_dir}`, `${mcpp.bin_dir}`, `${mcpp.compile_db}`,
`${mcpp.self}` and `${mcpp.stage_dir}` were replaced with the path's native
spelling, while `${mcpp.target_file:}` and `${mcpp.artifact:}` were already
generic. A build program that wrote `${mcpp.out_dir}/gen/x.cppm` therefore got
`C:\proj\target\...\gen/x.cppm` on Windows: one argv token carrying two
separator conventions.
The five sites use `generic_string()`, the spelling `escape_ninja_path` already
gives every ninja node name and the tool paths (the compiler, `ar`, `mcpp`
itself). POSIX output is byte-identical, so this changes no existing edge west
of Windows.
e2e 660, which runs on the Windows shard the `${mcpp.self}` token exists for,
now asserts the action rule's argv carries no backslash. docs/30 and docs/zh/30
state the rule beside the vocabulary table.
Closes#393.
Copy file name to clipboardExpand all lines: docs/30-build-mcpp.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1086,6 +1086,14 @@ none to rely on), and the only interpolations are a closed set:
1086
1086
|`${mcpp.stage_dir}`*(2026.9.11.1+)*| the tree `mcpp pack` staged, absolute. `artifact` role only, and only under `mcpp pack --format <name>`|
1087
1087
|`${mcpp.self}`*(2026.9.13.1+)*| the engine's own executable, absolute. An action's command is an argv with no shell, so a build program has no portable way to copy a file; the engine is present wherever a build runs, and `${mcpp.self} stage --verify content --output <dst> <src>` copies one file, creates the destination's parent, and writes only when the bytes differ. That argument shape is a contract from 2026.9.13.1 on; a build program that names it declares that release as its floor |
1088
1088
1089
+
Every path a `${mcpp.*}` token expands to is spelled with **forward slashes**.
1090
+
A token is spliced into the text the build program wrote, and that text spells
1091
+
its own separators as `/`; a native spelling on Windows would put a `C:\…`
1092
+
prefix beside that `/` inside one argv token. This is the spelling `mcpp` gives
1093
+
the compiler, the archiver and every ninja node name, so
1094
+
`${mcpp.out_dir}/gen/x.cppm` reads as one separator on Windows as well as on
1095
+
POSIX.
1096
+
1089
1097
The raw stdout protocol above remains the low-level substrate; `import mcpp;`
0 commit comments