-
Notifications
You must be signed in to change notification settings - Fork 1.9k
fix: Resolve target-dir more precisely
#20920
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
Conversation
| locked: bool, | ||
| progress: &dyn Fn(String), | ||
| ) -> anyhow::Result<(cargo_metadata::Metadata, Option<anyhow::Error>)> { | ||
| _ = target_dir; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deleting this single line resulted in deleting/simplifying extra dozens of lines π
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I take it this is a remnant of us copying the lock file to the target directory?
|
I'm gonna test this with more configurations |
|
Okay, this works fine except it doesn't fix the original issue when there are linked projects and |
|
Is this ready to merge or are the comments still applicable? Would love to get this in before the next release |
|
Yeah, this is ready to be merged |
Fixes #20821
Currently, there are some buggy situations:
rust-analyzer.cargo.targetDiris set tonull, flycheck output files are written to thetarget/, even iftarget-diris set otherwise either with env vars or config files.rust-analyzer.cargo.targetDiris set totrue, and$CARGO_TARGET_DIRis unset, rust-analyzer's flycheck artifacts are written intarget/rust-analyzer, even if thetarget-diris set otherwise either with$CARGO_BUILD_TARGET_DIRor cargo config file.