Repository navigation
test(paths): assert the mapped external root by meaning, not separator style (#1780) - #1794
Merged
Merged
Conversation
…r style `debug_prefix_map_covers_an_external_build_root` compared the emitted flag to the literal `/tmp/short-build-dir/uno/quick`. The layout joins the override root, target and profile with the HOST separator, and Windows also normalises the leading separator, so no single literal matches both hosts (observed: left `\\\\tmp\\\\short-build-dir\\\\uno\\\\quick`, right `/tmp/short-build-dir\\\\uno\\\\quick` on windows-latest). Assert the flag's meaning instead: it is a prefix-map, it ends in =fbuild-build, it names the override root, and the mapped value ends with <target>/<profile>. That holds on every platform by construction. Last remaining Windows red in the ci-full lane; the other path-separator cases (disk preflight, rebuild signature) are already fixed on main by #1780. Verified: cargo test -p fbuild-paths --lib debug_prefix_map -> 4 passed.
|
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.
Last Windows-path-separator red in the
ci-fulllane.Problem
debug_prefix_map_covers_an_external_build_rootasserted against the literal/tmp/short-build-dir/uno/quick=fbuild-build. The layout joins the override root, target and profile with the host separator, and Windows additionally normalises the leading separator, so onwindows-latestthe emitted flag was:No single literal can satisfy both hosts, and rebuilding the string with
Path::joinstill differs in the leading separator — so the test was asserting a separator style rather than the behaviour it exists to pin.Fix
Assert the flag's meaning: it is a
-fdebug-prefix-map=, it ends in=fbuild-build, the mapped value names the override root (short-build-dir), andPath::new(mapped).ends_with("uno"/"quick"). That is host-agnostic by construction and still fails if the override root stops being mapped or the target/profile stop being appended.Verification
The other path-separator cases surfaced by the same canary — disk preflight and rebuild signature — are already fixed on
main(the latter cites #1780); this was the only remaining red, which is why the 0.9.44 promotion canary needed a branch-local copy of it.Refs #1780.