Skip to content

test(paths): assert the mapped external root by meaning, not separator style (#1780) - #1794

Merged
zackees merged 1 commit into
mainfrom
fix/windows-path-separator-tests
Oct 30, 2026
Merged

zackees merged 1 commit into
mainfrom
fix/windows-path-separator-tests

Conversation

@zackees

@zackees zackees commented Oct 30, 2026

Copy link
Copy Markdown
Member

Last Windows-path-separator red in the ci-full lane.

Problem

debug_prefix_map_covers_an_external_build_root asserted 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 on windows-latest the emitted flag was:

left  (production): -fdebug-prefix-map=\\\\tmp\\\\short-build-dir\\\\uno\\\\quick=fbuild-build
right (expected):   -fdebug-prefix-map=/tmp/short-build-dir\\\\uno\\\\quick=fbuild-build

No single literal can satisfy both hosts, and rebuilding the string with Path::join still 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), and Path::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

cargo test -p fbuild-paths --lib debug_prefix_map   -> 4 passed

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.

…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.
@coderabbitai

coderabbitai Bot commented Oct 30, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@zackees
zackees added this pull request to the merge queue Oct 30, 2026
Merged via the queue into main with commit 594ae4a Oct 30, 2026
27 checks passed
@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Oct 31, 2026
@zackees
zackees deleted the fix/windows-path-separator-tests branch November 5, 2026 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

1 participant