-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add config option to use rust-analyzer
specific target dir
#15681
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
@Veykril I realized it might not make sense for us to pass |
b5fc5f2
to
ec38198
Compare
Why would the env var make more sense then passing the flag? |
Is it not possible for the Flycheck custom command to invoke another command that invokes |
That's fine, if you use a command override most of the settings no longer apply. In general we expect people to completely build up their command if they use an override. And if your custom command invokes cargo later it should be your commands job to pass the target dir options. |
d9dddbe
to
e0c74be
Compare
That makes sense, I've changed it back to using @rustbot ready |
e0c74be
to
09421fd
Compare
Adds a Rust Analyzer configuration option to set a custom target directory for builds. This is a workaround for Rust Analyzer blocking debug builds while running `cargo check`. This change should close rust-lang#6007
Add dedicated field for `target_dir` in the configurations for Cargo and Flycheck. Also change the directory to be a `PathBuf` as opposed to a `String` to be more appropriate to the operating system.
09421fd
to
a39d207
Compare
Thank you so much for the mentorship! I've addressed your comments. @rustbot ready |
Thanks! |
☀️ Test successful - checks-actions |
/// | ||
/// Set to `true` to use a subdirectory of the existing target directory or | ||
/// set to a path relative to the workspace to use that path. | ||
rust_analyzerTargetDir: Option<TargetDirectory> = "null", |
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.
Would have made sense to call this cargo_
instead.
Brilliant idea! EDIT: this was meant for #15713 :-) The idea in this PR is more obvious, but, really, this is a big feature we should have implemnted years ago, so kudos here as well ❤️ |
Adds a Rust Analyzer configuration option to set a custom target directory for builds. This is a workaround for Rust Analyzer blocking debug builds while running
cargo check
. This change should close #6007.This is my first time contributing to this project, so any feedback regarding best practices that I'm not aware of are greatly appreciated! Thanks to all the maintainers for their hard work on this project and reviewing contributions.