fix: Canonicalize custom-target.json paths when fetching sysroot metadata#20964
Merged
Veykril merged 1 commit intorust-lang:masterfrom Nov 3, 2025
Merged
fix: Canonicalize custom-target.json paths when fetching sysroot metadata#20964Veykril merged 1 commit intorust-lang:masterfrom
custom-target.json paths when fetching sysroot metadata#20964Veykril merged 1 commit intorust-lang:masterfrom
Conversation
cd534e3 to
5d8ad4b
Compare
5d8ad4b to
f09b0a8
Compare
Veykril
approved these changes
Nov 3, 2025
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 #20959
The issue might be a regression from #20866, as before it we used to call
cargo metadataon sysroot withcwd = project_root.But as the PR fixes some delicated issues around cargo configs that cannot be applied sysroot like vendoring ones.
I think keeping that as is would be more preferable as canonicalizing
build.targetoptions is a simple fix for the issue, whereas erasing options that shouldn't be applied to sysroot metadata would be quite demanding.But we might end up doing so or implement some alternatives as complex as it if we have two large sets of cargo config options - should be applied to sysroot / should not be applied to sysroot 🤔
BTW, I'm gonna write more organized test suite for cargo handling things this weekend 😅