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 9291f1c
Browse filesBrowse the repository at this point in the historyBrowse files
feat(build.mcpp): this build system's own tools come first on PATH
mcpp installs its tools into its own sub-OS — 221 programs on the
machine this was written on — and a build program inherited a PATH with
none of them on it. A program that wanted a tool had to ask PATH the way
a shell script would, and `command -v` answers about the machine rather
than about this build.
Measured with a build program that printed its own PATH:
/home/…/.xlings/data/xpkgs/xim-x-claude/2.1.222
/home/…/mcpp/.xlings/subos/_/bin
/home/…/.xlings/subos/current/bin
subos/bin in PATH: NO
and the concrete cost, from the same day: `command -v
qemu-system-riscv64` returned a shim that answers, when run,
[error] qemu-system-riscv64 is not installed in this subos (_)
— found, reported present, unable to execute, while the working copy sat
in mcpp's own directory unreachable.
⚠️ PREPENDED, NOT SUBSTITUTED. A build program legitimately calls `git`,
`python3` or a shell, none of which this build system ships; a PATH
holding only mcpp's directory would break every one of them for a
guarantee nobody asked for. Front position makes the isolated copy the
default answer and leaves the host reachable behind it. The inherited
value is read in `contract_env` rather than assumed, because `extraEnv`
replaces a variable outright in the child.
⭐ RESOLVED ONCE. `toolsBinDir` is computed after `get_cfg` and handed to
`fill_target_build_env`, whose comment already promised "all four in one
call" — it is now the fifth answer that call gives. The first draft of
this change derived it separately at each of the two call sites (root
package and dependency), which is precisely the shape behind all three
defects fixed in this release: one fact, computed in more than one
place, agreeing until it does not.
Read through the config resolver rather than `~/.mcpp`, like every other
consumer of that directory (doctor, resources): `MCPP_HOME` moves it.
Empty when no sub-OS exists yet, and PATH is then left as inherited.
e2e 290 asserts both halves — that the first entry is mcpp's directory,
AND that the inherited entries survive behind it. A test checking only
the first would pass on a PATH that had thrown the rest away. Measured
both ways: 40 entries after, and before the change the first entry was
an unrelated tool.
docs/07 gains a section stating the contract for package authors.
0 commit comments