Skip to content

fix: Canonicalize custom-target.json paths when fetching sysroot metadata#20964

Merged
Veykril merged 1 commit intorust-lang:masterfrom
ShoyuVanilla:canonicalize-tgts
Nov 3, 2025
Merged

fix: Canonicalize custom-target.json paths when fetching sysroot metadata#20964
Veykril merged 1 commit intorust-lang:masterfrom
ShoyuVanilla:canonicalize-tgts

Conversation

@ShoyuVanilla
Copy link
Copy Markdown
Member

Fixes #20959

The issue might be a regression from #20866, as before it we used to call cargo metadata on sysroot with cwd = 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.target options 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 😅

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 3, 2025
@Veykril Veykril added this pull request to the merge queue Nov 3, 2025
Merged via the queue into rust-lang:master with commit 5b884c4 Nov 3, 2025
15 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 3, 2025
@ShoyuVanilla ShoyuVanilla deleted the canonicalize-tgts branch November 4, 2025 02:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rust-analyzer fails to call cargo metadata with custom target spec

3 participants