fix: Add -Zjson-target-spec on Cargo calls where needed#21846
fix: Add -Zjson-target-spec on Cargo calls where needed#21846ChayimFriedman2 wants to merge 1 commit into
-Zjson-target-spec on Cargo calls where needed#21846Conversation
|
Yeah, the older versions without that flag will error with it. For the later, I guess we could just do it based on the toolchain version. Would that be hard because of some quirks in our codebase? (I can't check whether it's hard or not since I'm outside rn. Sry 😅 ) |
|
We already have the sysroot here so we should have the toolchain version queried already somewhere |
|
As Lukas said we should the toolchain version available there, I guess you could compare the toolchain version like the following lines: rust-analyzer/crates/project-model/src/cargo_config_file.rs Lines 171 to 173 in 803fb51 |
|
Hi @ChayimFriedman2, I've dropped #22435 in favour of this PR. Two notes that may help unstick it:
I'd be happy to push a commit to this branch that adds the metadata site and version gating if you'd like, or leave it for you. Either is fine. |
|
☔ The latest upstream changes (possibly #22432) made this pull request unmergeable. Please resolve the merge conflicts. |
Fixes #21821.
CC @ShoyuVanilla assuming you know - do we need to gate this only for affected Cargo versions? If so, how?