Skip to content

Commit 13bcf7c

Browse files
fix(xlings): the remedy for a SubOS with no subos_info is a command that works (#447)
Three messages told the user how to get an undescribed SubOS described, and all three named something that does not do it. The wording has now been wrong in two opposite directions: 1. `xlings self update` — which does not touch a subos manifest at all. 2. "an existing one is NOT backfilled; recreate the SubOS" — the correction to (1), and also wrong. `xlings self doctor --fix` has always described the ACTIVE subos; what it got wrong was the CONTENT, stamping the block with whatever the built-in default libc happened to be rather than with what the SubOS actually runs. xlings 2026.8.17.1 fixes the content (openxlings/xlings#547): the runtime now comes from the recorded binding, the workspace record, or the payload behind `lib/libc.so.6` — and when none of those can answer, the `runtime` key is OMITTED rather than filled with a guess. That last part lands on a path this file already had: `info.present && info.runtime.empty()` already notes that runtime rules cannot be evaluated. It was written for a hypothetical and is now the honest state a described-but- unprovable SubOS reports, so nothing here needs to change to accept it. "from inside this SubOS" is load bearing: doctor inspects the subos the run is in and no other. When mcpp is the one complaining, the user is in it. Telling someone to delete and recreate a SubOS to recover an environment is a large ask, and it was never the smallest one that works. Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
1 parent 7b3f7ef commit 13bcf7c

3 files changed

Lines changed: 23 additions & 9 deletions

File tree

src/platform/runtime_binding.cppm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,8 @@ resolve_runtime_binding(
284284
" Where the C runtime comes from a payload, there is now no "
285285
"declared runtime to bind to — mcpp declines to guess a version, so "
286286
"the link falls back to the host and the hermeticity check will say "
287-
"so. Only a SubOS created by a current xlings carries the block "
288-
"(openxlings/xlings#547).",
287+
"so. Run `xlings self doctor --fix` from inside this SubOS to have "
288+
"it described (openxlings/xlings#547).",
289289
selection.subosName,
290290
info.note.empty() ? "no `subos_info` block" : info.note));
291291
} else if (info.schema > mcpp::xlings::subos::kSupportedSchema) {

src/platform/xlings/subos_info.cppm

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,13 +143,28 @@ Info read(const std::filesystem::path& subosDir) {
143143

144144
auto it = doc.find(std::string(kBlock));
145145
if (it == doc.end() || !it->is_object()) {
146+
// The remedy has to be a command that WORKS, and this one has been
147+
// wrong twice in opposite directions.
148+
//
149+
// It first said `xlings self update`, which does not touch a subos
150+
// manifest at all. It was then corrected to say nothing backfills and
151+
// that recreating the SubOS is the only way -- also wrong: `self
152+
// doctor --fix` has always described the ACTIVE subos, and as of
153+
// xlings 2026.8.17.1 it describes it truthfully rather than stamping
154+
// it with whatever the current default libc happens to be
155+
// (openxlings/xlings#547).
156+
//
157+
// Naming the active subos matters: doctor inspects the one this run is
158+
// in and no other, so the user has to be inside the subos that is
159+
// missing its block -- which, when mcpp is the one complaining, they
160+
// are.
146161
info.note = std::format(
147162
"subos '{}' does not describe itself (no `{}` block), so programs "
148163
"run from here get no environment it declares — a GL application "
149-
"will not find its drivers. A SubOS created by a current xlings "
150-
"carries it; an existing one is NOT backfilled by `self update` or "
151-
"`self doctor --fix` (openxlings/xlings#547), so recreating the "
152-
"SubOS is what supplies it today",
164+
"will not find its drivers. Run `xlings self doctor --fix` from "
165+
"inside this SubOS to have it described (xlings 2026.8.17.1 or "
166+
"newer records what the SubOS actually runs; older ones record the "
167+
"built-in default, which may not be what is installed here)",
153168
subosDir.string(), kBlock);
154169
return info;
155170
}

src/toolchain/lifecycle.cppm

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -874,9 +874,8 @@ export int toolchain_install(const mcpp::config::GlobalConfig& cfg,
874874
mcpp::ui::warning(std::format(
875875
"installed, but not bound to a C runtime: {}.\n"
876876
" The install itself succeeded. To complete the wiring, "
877-
"use a SubOS created by a current xlings — an existing one is "
878-
"not backfilled (openxlings/xlings#547) — then re-run this "
879-
"command.",
877+
"run `xlings self doctor --fix` from inside this SubOS, then "
878+
"re-run this command (openxlings/xlings#547).",
880879
fixed->skippedReason));
881880
}
882881

0 commit comments

Comments
 (0)