Repository navigation
fix(build-engine): re-root drive-relative compile-database paths on Windows - #2058
Merged
Merged
Conversation
…indows `respell` refused any path that was not `Path::is_absolute`, but on Windows a drive-relative spelling like `/proj/main.c` is rooted without a prefix and is not absolute — so a Windows capture kept its absolute-looking file/output entries and the compile database was never re-rooted there. The predicate is now `has_root()`: a relative name is still left untouched, and `relative_spelling` still answers `None` for two roots that do not meet (a drive split), through its shared-component guard. Surfaced by `full / windows / Check` on #1633 once #2049's clippy red stopped masking it: `reroot_spells_sources_relative_to_the_project`, `reroot_removes_scratch_and_checkout_prefixes` and `merge_adds_framework_entries_only_idf_compiled` failed with the absolute spelling (`/proj/main/main.c`) instead of the project-relative one.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
…n find them
The ESP-IDF/ESP32 fixtures wrote POSIX binary names ("python", "xtensa-esp-elf-gcc")
while the code under test looks them up through
`platform::executable::native_name` — so on Windows `is_installed()`,
`missing_units()` and `python()` saw nothing and three tests failed:
* `esp32::tests::test_slice_variant_installs_into_a_chip_scoped_directory`
* `esp_idf_install_tests::installed_bytes_sums_every_unit_and_dedupes_hardlinks`
* `esp_idf_install_tests::a_missing_unit_is_named_instead_of_reading_as_a_small_tree`
Fabricate with `tool_name`/`native_name` instead. On Linux the names are
unchanged, so the byte-count expectation (2068) still holds: only the *contents*
are summed, never the file names.
…ves it The last Windows failures were the interpreter *directory*: a venv's PATH entry is `bin` on Unix and `Scripts` on Windows, and the fixture hardcoded `bin`, so `python()` named a file that was never created. Build the tree through `IdfPythonEnvironment::new(..)` and create `python.bin_dir()`, then write `python.python()` itself — the exact file `missing_units()` looks for.
`full / windows / Check` runs `renesas_acceptance::` with `--ignored`, i.e.
both acceptance tests in ONE process. Each called `CompileBackend::start()`,
and a second concurrent start cannot win the zccache cache-root writer slot:
Start("... cache root C:\Users\runneradmin\.fbuild\dev\zccache\v1.15.8
unusable: another live daemon already holds this cache root ...")
Use the guarded `OnceCell` installer the sibling harnesses already carry
(`nxplpc_build_flags.rs`, `clangd_check_parity.rs`), so the second test reuses
the process-wide backend instead of racing for it.
This was referenced Nov 17, 2026
zackees
added a commit
that referenced
this pull request
Nov 18, 2026
Brings #2051 (reroot relative spelling), #2057 (rp2040 large future), #2058 (respell has_root / native tool spelling / renesas OnceCell), #2059 (bench framework + tracing feature) and #2063/#2067. Only conflict was fbuild-toolchain esp32.rs test fixture, resolved to main's #2058 native-spelling semantics (explicit native_name let-binding).
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.
What
crates/fbuild-build-engine/src/compile_database/merge.rs::respellgatedre-rooting on
Path::is_absolute(). On Windows that is the wrong predicate: adrive-relative spelling such as
/proj/main.chas a root but no prefix, soit is neither absolute nor relative —
respellreturnedNoneand a Windowscapture kept its absolute-looking
file/outputentries.The gate is now
has_root():main/main.c) is still left exactly as captured;relative_spellingstill answersNonewhere no relative path exists (tworoots that do not meet, e.g.
/projagainstC:/proj), via itsshared-component guard — unchanged.
Why now
full / windows / Checkon #1633 went red once #2049'sclippy::large_futureserror stopped masking the test phase. Three
compile_database::mergetestsfailed there with the pre-fix spelling:
This is a main-side latent break:
ci-full(the only workflow that runs themacOS/Windows matrix) runs on PRs that carry the
ci-fulllabel, so main neversees it. It is not caused by #1633 — its diff does not touch this module.
Tests
New
respell_rewrites_only_rooted_spellingspins the contract; it returnsNonefor/proj/main/main.cunder the oldis_absolutepredicate on Windows,so the Windows cell is a real regression test, not just a green.
soldr cargo test -p fbuild-build-engine --lib compile_database→ 91 passed, 0 failed, 0 ignoredsoldr cargo clippy -p fbuild-build-engine --all-targets --no-deps -- -D warnings -A unfulfilled_lint_expectations→ exit 0soldr cargo clippy -p fbuild-build-engine --all-targets --target x86_64-pc-windows-msvc -- -D warnings -A unfulfilled_lint_expectations→ exit 0soldr cargo fmt --all -- --check→ exit 0ci/enforce_platform_boundary.py --print-totals→rows=44; dylint_rows=43The
ci-fulllabel is set so thefull / windows / Checkcell proves it.#1633 is unaffected (stays blocked only on its owner review).
Second window:
fbuild-toolchainfixtures (same cell)With the merge tests fixed, the same
full / windows / Checkcell reportedthree more Windows-only failures, all one cause: the ESP-IDF/ESP32 fixtures
wrote POSIX binary names while the code looks them up via
platform::executable::native_name.esp32::tests::test_slice_variant_installs_into_a_chip_scoped_directory("a chip-scoped install must be found")
esp_idf_install_tests::installed_bytes_sums_every_unit_and_dedupes_hardlinks(
installed.missing_units().is_empty())esp_idf_install_tests::a_missing_unit_is_named_instead_of_reading_as_a_small_tree(
remove_file(python.python())→NotFound)Fixtures now fabricate
tool_name/native_namespellings; on Linux nothingchanges, so
installed_bytes= 2068 still holds (sizes are summed, never names).cargo test -p fbuild-toolchain --lib→ 203 passed, 0 failed, 6 ignored.Remaining reds are external (#2064)
The nine ESP32 board cells die in ~1 min with
download failed for .../tasmota/esptool/releases/download/v5.6.0/esptool-linux-amd64.zip: HTTP 404whilepioarduino/esptool v5.6.0 esptool.zipstill 302s — reported as#2064.
CI summary/CI selected coverage/full / Full coverageareaggregators over those cells. Every code cell is green, including
full / windows / Check(48m02s), both macOS cells, Dylint Full and the LOC/boundary/lint gates.