-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removing hash from output files when using MSVC #7400
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
Failing tests are:
Will dig into the issues later. |
Thanks for the PR here @snf! This is technically a breaking change for MSVC, which is why some tests are failing. To explain a bit more with the purpose of those hashes, the intention is that if you do a sequence of commands like:
The last command ideally should have everything fully cached. To do that we tell the compiler that for When I say "breaking change" though that's still fine, this is only breaking in that the exact behavior of Cargo is changing, but it's unlikely to affect too too many folks. We could also fix this behavior in time I believe, just emitting As for each test:
|
Thanks for the detailed explanation Alex! A lot of assumptions ahead, please verify them. I'm thinking that the problem is that the linker will generate the internal names to match the output files. If we want the file names with hashes in the intermedary directory, it could be possible to link If this works, I'm not even sure where should I start but I can give a shot at it next week. Also, confirm if this might be a too complex solution. |
That... I think could work! It'd be a bit wonky though because we would generate |
Thanks! Given my current load, I'll work on fixing the failling tests and I can check for the "better" solution later when I have more cycles available. |
☔ The latest upstream changes (presumably #7425) made this pull request unmergeable. Please resolve the merge conflicts. |
Fixed the tests. Please let me know if they look ok. Commits squashed. |
@bors: r+ 👍 |
📌 Commit e7c5579 has been approved by |
⌛ Testing commit e7c5579 with merge 70c335a8f7119f9b64799453fa51f1a6f266e228... |
💔 Test failed - checks-azure |
@bors: retry |
Removing hash from output files when using MSVC This is the fix for #7358 suggested by @alexcrichton . Tested and working. I see a few tests failling but seem unrelated. I'll investigate them tomorrow.
☀️ Test successful - checks-azure |
(Sorry, I'm a bit behind on reviews.) I'm concerned this changed the semantics of the |
@ehuss I'm not sure I quite understand, but it sounds like I'm missing some consequences of switching to using no metadata here perhaps? |
Update Cargo To pull rust-lang/cargo#7482 List of merged PRs: - Fix wrong directories in PATH on Windows (rust-lang/cargo#7482) - Update SPDX list to 3.6 (rust-lang/cargo#7481) - Mark Emscripten's .wasm files auxiliary (rust-lang/cargo#7476) - Update `curl-sys` dependency requirement (rust-lang/cargo#7464) - add dependencies for `pkg-config` (rust-lang/cargo#7443) - Removing hash from output files when using MSVC (rust-lang/cargo#7400) - Disable preserving mtimes on archives (rust-lang/cargo#7465) - Removed redundant borrow (rust-lang/cargo#7462) - Public dependency refactor and re-allow backjumping (rust-lang/cargo#7361) - unify the quote in Cargo.toml (rust-lang/cargo#7461)
Re-enable some MSVC tests. These tests were disabled for MSVC in #7400, but I would prefer to keep them running.
This is the fix for #7358 suggested by @alexcrichton . Tested and working.
I see a few tests failling but seem unrelated. I'll investigate them tomorrow.