Repository navigation
Conversation
Problem: on Windows three relink tests failed on main although the app is fine. The relink code writes the paths it derives with a forward slash, the tests built their expected paths with PathBuf::join, which mixes both separators, and compared them as strings. Both spellings name the same file on Windows. Fix: the tests compare Path values (component-wise) instead of strings. Test code only, no product change. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Member
|
Thank you @vangel76, and sorry for the overlap: you found these first (#1267). I landed #1639 before seeing this PR. It fixes the same three tests, and while in there it fixes the cause too: |
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.
Fixes #1267.
What this does
Three relink tests (from #1106) fail on Windows on
main. The app is fine; the tests compare path strings. On Windows the relink code writes the paths it derives with/, while the tests build their expected paths withPathBuf::join, which mixes\and/. Both spell the same file, and the relinked paths work on Windows. Test code only, no product change. Each failure was reproduced on unmodifiedmainfirst.effectcraft-enginerelinking_one_file_finds_the_others_that_moved_with_it: comparesPathvalues instead of strings.effectcraft-enginefootage_moved_with_its_project_is_found_on_open: looks for the relinked file withPathequality instead ofcontainson a string.effectcraft-hostreplacing_a_missing_file_relinks_the_others_that_moved_with_it: usesPath::starts_withinstead of a string prefix check.Pathcomparison is by components, so the tests behave the same on macOS and Linux.Checks
Windows 11, Rust 1.99, on top of
mainat 549e9d8.mainand pass with this change.cargo fmt --all --checkpasses;cargo clippy --workspace --all-targets --release -- -D warningspasses.cargo test --release -p effectcraft-engine --lib(612 passed) and-p effectcraft-host --test relinkpass.cargo test --workspaceandcargo xtask layers/assets/wasm(test-only change in two crates; CI covers the rest).