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
design: the authored project file is the reference, not a SubOS state file
Two artifacts share the name and this document measured one for the other. The
authored file maps a name to a version string or a platform object;
d2mcpp/.xlings.json is the published example, and it settles two of the three
open items.
Version unconstrained is the empty string. "code": "" is already in use, the
resolver returns it unchanged, and an empty value reads downstream as claiming
no version — which is what deps = ["cmake"] means today. No * and no latest is
introduced.
The namespace in the key position is undefined rather than forbidden: nothing
derives an install address from a workspace entry, because nothing installs
from workspace at all, so the question becomes real only when mcpp does. Both
candidate forms are stated with what each costs, and the item is marked as a
request rather than a finding.
The native platform keys are recorded as linux, windows, macosx and default.
the key being the xvm target and the namespace riding the value, exactly as the
140
-
file writes it. mcpp reconstructs the install address `xim:picolibc-riscv@1.8.12`
141
-
from the pair when it provisions, so nothing is lost, and the C library mcpp
142
-
injects (§4) is expressible in the same shape.
143
-
144
-
A key containing a colon is a **hard error naming the correct form**, rather
145
-
than a second accepted spelling: one fact, one way to write it, is the whole
146
-
argument of this document applied to itself.
147
-
148
-
**W3. The per-platform value form is unchanged.** It is already accepted on
149
-
both keys (2026.9.2.1) and it survives the merge unmodified.
111
+
**W1. "Version unconstrained" is the empty string, and it is already in use.**
112
+
`"code": ""` in the example above is the spelling. `resolve_platform_workspace_value_`
113
+
returns it unchanged and `workspace_from_json` stores it
114
+
(`src/core/xvm/db.cppm:383`, `db.cpp:1100-1110`); downstream, an empty value is
115
+
read as "this entry claims no version" (`Config::version_origin`'s `claims`
116
+
predicate, `config.cpp:1108-1112`). So the entry names a member of the
117
+
environment and leaves its version open, which is exactly what `deps = ["cmake"]`
118
+
means today. No `*` and no `latest` is introduced: `""` is the form the file
119
+
already has, and it maps onto an install target with no `@version`.
120
+
121
+
**W2. The namespace is undefined in this position today, and defining it is
122
+
xlings' call.** No workspace key anywhere carries one: not in the authored
123
+
example above, and not in 1635 version-database targets or 546 SubOS entries on
124
+
the development host. The colon appears only on the version side, where a
125
+
scope qualifies where a version came from — `"mcpp": {"active":
126
+
"xim:2026.8.30.2", …}`, one target holding both scoped and unscoped versions.
127
+
128
+
But that is a statement about **resolution**, and the namespace is needed for
129
+
**installation**, and nothing derives an install address from a workspace entry
130
+
today, because nothing installs from `workspace` at all (§13.2). The moment
131
+
mcpp does, the question becomes real and has two candidate answers:
132
+
133
+
| Form | Reads | Costs |
134
+
|---|---|---|
135
+
|`picolibc-riscv = "xim:1.8.12"`| key is the xvm target; the scope rides the version, as the version database already spells it | the address is assembled from two halves |
136
+
|`"xim:picolibc-riscv" = "1.8.12"`| key is the install address, as `deps` spells it | the key is no longer the name the shim looks up, so resolution has to strip it |
137
+
138
+
The second is closer to `deps` and to how a person thinks about a package; the
139
+
first is closer to what the file already contains. Either works if the rule is
140
+
stated once — what must not happen is both being accepted, which would put one
141
+
fact in two spellings. **This is the one item in section 3 that is a request
142
+
rather than a finding.**
143
+
144
+
**W3. The per-platform form is xlings' own, and its native keys are
145
+
`linux`, `windows`, `macosx` and `default`** (`platform::OS_NAME` per
146
+
`modules/platform/src/platform/*.cppm`, resolved by
147
+
`resolve_platform_workspace_value_`). mcpp additionally accepts `macos` as an
148
+
alias, which is a superset and stays; the documentation should show `macosx`
149
+
as the aligned spelling.
150
150
151
151
## 4. What mcpp writes into `.xlings.json`
152
152
@@ -537,29 +537,37 @@ workspace replaces the global one. That belongs in `docs/17`.
537
537
answers Q1: xlings does not provision from `workspace`, which is why section 4
538
538
was revised rather than kept.
539
539
540
-
### 13.3.1 What a workspace key is: an xvm target, of any kind
540
+
### 13.3.1 Two artifacts share the name `.xlings.json`
541
+
542
+
They must not be measured for each other, and this document did so once.
543
+
544
+
**The authored project file** is what a person writes and what mcpp
545
+
materialises: `workspace` maps a name to a version string or to a
546
+
platform-conditional object, and nothing else. `d2mcpp/.xlings.json` is the
547
+
published example (§3).
541
548
542
-
Measured on the development host's default SubOS, 546 entries:
549
+
**A SubOS state file** is what `cmd_use` writes: the same key space, but each
550
+
value is an `{active, installed[]}` record, and the keys are every member of
551
+
every release ever switched to. On the development host's default SubOS that is
552
+
546 entries, including package roots, their programs, and file assets:
0 commit comments