Repository navigation
refactor(ape): delegate fbuild's APE loader to running-process - #2132
Merged
Merged
Conversation
(cherry picked from commit 6ea7f1b)
(cherry picked from commit 9533dc7)
(cherry picked from commit 0841f49)
(cherry picked from commit 9f4b322)
…ck chain (cherry picked from commit 5435b4b)
(cherry picked from commit c0d51a8)
(cherry picked from commit 7ab97c9)
… delegation fbuild-core no longer depends on flate2, and the platform-specific APE loader files are gone, so their rows leave the research inventory.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supersedes #1638. This is the same migration, ported onto current
maininstead of the oldfeat/ape-host-toolsstack.What changes
fbuild stops carrying its own APE (cosmocc) loader and uses the one in running-process, which is already linked into fbuild through
kernal-api 0.1.26(zccache 1.15.8).crates/fbuild-core/src/platform/ape/mod.rsbecomes a 389-line adapter overrunning_process::ape. It keeps fbuild's policy:FBUILD_APE_LOADER,FBUILD_APE_CACHE_DIR,FBCACHE_DIR,FBUILD_CACHE_DIRand the registered cache root, in that fallback order.ape/{install,native,prologue}.rsandplatform/{linux,macos,windows}/ape.rsare deleted, along with the private-directory and exec-mount helpers only they used.fbuild-coredrops itsflate2dependency.zccache_embedded.rsno longer swaps an APE compiler for a generated#!/bin/shshim; it passes the loader and cache settings through the compile environment and kernal-api plans the launch.platform/process.rsdrops fbuild's ownFORK_LOCK.shared_fork_guard()now returns running-process's fork guard, so there is one lock for loader writes and spawns instead of two that did not know about each other.running-processpin gains theape-loaderfeature. Versions are unchanged (running-process =4.10.16,zccache =1.15.8); no git pin.Net: 24 files, +443 / -1800.
One behaviour change, in its own commit
fix(process): resolve relative tools against child working directory(f3f8f643): an explicit relative program path (./tool) passed torun_commandwith a childcwdis now resolved against thatcwdbefore the spawn. Windows otherwise resolves it against the parent's cwd. Bare names keep PATH lookup and absolute paths are untouched. It comes with a unit test and a symlink-traversal regression test. The original PR needed it to pass on Windows (run 37146132601 failed without it, 37148075175 passed with it).Provenance
Seven commits are cherry-picked (
-x) fromresume/fbuild-pr1638, authorship preserved:6ea7f1b8,9533dc7a,0841f49a,9f4b3223,5435b4b7,c0d51a86,7ab97c98. The only conflicts wereCargo.lockand sixCargo.tomlfiles, all resolved tomain(the old zccache git pin is not needed). One new commit refreshesCargo.lockandci/platform_boundary_research.tsv.Validation (local, Linux x86_64, NixOS, no APE
binfmt_mischandler)soldr cargo test -p fbuild-core: 438 + 34 + 2 passed, 0 failed.soldr cargo clippy -p fbuild-core -p fbuild-build-engine --all-targets -- -D warnings: clean.uv run --no-sync python -m ci.run_dylint --package fbuild-core: exit 0.uv run --no-project python ci/platform_boundary_research.py --check: clean.FBUILD_TEST_COSMOCC=... soldr cargo test -p fbuild-build --test it -- ape_ --ignored: both pass,ape_gcc_compiles_through_run_command_in_hostile_envandape_gcc_compiles_through_embedded_zccache_and_hits_cache(cold miss then warm hit, hostile PATH, unusable preferred cache dir).Not verified
#[ignore], 440 MB toolchain). On macOS and Windows this PR is covered byci-fullunit and integration lanes and the bundledhello.comAPE fixture tests only, not by a real cosmocc compile.ape-m1.cvia hostcc) is exercised only if the hosted macOS lanes run thehello.comfixture tests.fbuild build tests/platform/uno -e uno) was not run. Another agent's dev daemon held~/.fbuild/dev/daemon/root-owner.lockfor the whole session, and the daemon root is derived from the home directory with no override, so a second dev daemon could not be isolated.fbuild-cliandfbuild-daemonbuild, and the freshly built daemon starts and reaches the root-ownership phase through the changed detached-spawn path. Real builds are covered by the hostedci-fullbuild lanes.soldr cargo test -p fbuild-build-engine: 597 + 1 passed, 0 failed (added after the first draft of this description).