Open and answer this issue on GitHub.
std, ready · opened 2026-11-05 · updated 2026-11-05 · 0 comments
27 tests in tests/compiler/tests/ that run the toolchain themselves (nikaia fmt, nikaia build, …) copy the same helper to find it:
fn toolchain() -> String throws {
let exe = process::run("sh", ["-c", "e=$(readlink /proc/$(cut -d' ' -f4 /proc/$PPID/stat)/exe); [ \"$(basename \"$e\")\" = nikaia ] && echo \"$e\""]).stdout.trim().clone()
if exe.len() > 0 { return exe }
return "target/fast/nikaia"
}
It reads the grandparent process out of /proc (Linux only) and falls back to target/fast/nikaia, a path CI does not have. When a test is started some other way, the lookup misses, the fallback is wrong and the test fails with “no such file or directory: target/fast/nikaia”. This happened to async_parse_fmt_formats_every_form in a builder’s run, on the binary before its change as well. A test has no way in Nikaia to name the toolchain that runs it.
nikaia test (and nikaia run) hand the program the path of the running toolchain, through a std entry (e.g. process::toolchain(), spelled the way std’s process entries are), backed by the path the binary already knows. Decide the name in the ADR or specification section on std::process.toolchain() with it; remove the /proc lookup and the target/fast/nikaia fallback.nikaia through it from a temporary directory.Generated by Claude Code