Skip to content

Commit bc4c2c9

Browse files
committed
design: the macos alias is one rule, and mcpp already had it
W3 said mcpp accepts the alias; it did not say where the fold lives. The implementation lifted it into mcpp::platform::xpkg_platform_key_for, which TargetPlatform::for_os and the manifest parser both call, and takes the host key from xpkg_platform rather than a second #if — an earlier draft hand-rolled both, which would have been a third copy of a two-line table.
1 parent d92a1b9 commit bc4c2c9

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

.agents/docs/2026-09-03-xlings-workspace-as-the-one-table.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,18 @@ keep that one fact rather than two:
152152
`mcpp.toml:6:4: error: expected …`, which says nothing about namespaces, so
153153
the documentation shows the quotes.
154154

155-
**W3. The per-platform value form is xlings' own.** Native keys are `linux`,
156-
`windows`, `macosx` and `default` (`platform::OS_NAME`, resolved by
157-
`resolve_platform_workspace_value_`). mcpp additionally accepts `macos`, a
158-
superset that stays; the documentation shows `macosx` as the aligned spelling.
155+
**W3. The per-platform value form is xlings' own, and the alias is one rule.**
156+
Native keys are `linux`, `windows`, `macosx` and `default`
157+
(`platform::OS_NAME`, resolved by `resolve_platform_workspace_value_`). mcpp
158+
accepts `macos` as well, because that is what its own triples say — one
159+
platform under two vocabularies.
160+
161+
The fold belongs in one place, and mcpp already had one: `TargetPlatform::for_os`
162+
knew it. The implementation therefore lifts it into
163+
`mcpp::platform::xpkg_platform_key_for`, which `for_os` and the manifest parser
164+
both call, and takes the host key from `mcpp::platform::xpkg_platform` rather
165+
than a second `#if`. An earlier draft of this section hand-rolled both, which
166+
would have been the third copy of a two-line table.
159167

160168
### 2.3 What mcpp writes into the file
161169

0 commit comments

Comments
 (0)