Skip to content
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

Section on rust-analyzer should recommend enabling seperate cargo directories #1380

Open
alice-i-cecile opened this issue Jun 9, 2024 · 5 comments
Labels
A-Book C-Content X-Contentious There are nontrivial implications that should be thought through

Comments

@alice-i-cecile
Copy link
Member

Rust-analyzer › Cargo: Target Dir
Optional path to a rust-analyzer specific target directory. This prevents rust-analyzer's cargo check and initial build-script and proc-macro building from locking the Cargo.lock at the expense of duplicating build artifacts.
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.

This is a huge QoL / iteration speed improvement. It should be mentioned right after we talk about rust-analyzer. Call out both the pros and cons.

@alice-i-cecile alice-i-cecile added A-Book C-Content X-Uncontroversial This work is generally agreed upon labels Jun 9, 2024
@IceSentry
Copy link
Contributor

If it is mentioned it should also be made very clear that it will use even more memory since it duplicated the target directory. People already complain that the target is too big when using bevy and this won't help with that.

@BD103
Copy link
Member

BD103 commented Jun 11, 2024

I'm not sure I understand what is being discussed here: are you recommending that you set the path to the target directory in rust-analyzer to something other than the actual target directory, just so it does not lock cargo check and other commands?

I agree with IceSentry that this may cause a lot of extra files, especially since that you're far less likely to run cargo clean for that rust-analyzer specific directory. I feel like it could also lead to inconsistencies and confusion, though I haven't tested that specifically so it may be fine.

@BD103 BD103 added X-Contentious There are nontrivial implications that should be thought through and removed X-Uncontroversial This work is generally agreed upon labels Jun 11, 2024
@alice-i-cecile
Copy link
Member Author

Alright, I'm fine to leave this out.

@alice-i-cecile alice-i-cecile closed this as not planned Won't fix, can't repro, duplicate, stale Jun 11, 2024
@IceSentry
Copy link
Contributor

To be clear, I 100% think this should be recommended. I use it all the time and it's extremely useful. I just think it should be accompanied by a warning that it uses a lot more space.

@BD103 the rust-analyzer target folder is embedded in the base target folder so running cargo clean will also clean it. That part is not a concern. cargo-sweep doesn't pick it up, but it's not an official project anyway.

@BD103
Copy link
Member

BD103 commented Jun 11, 2024

@BD103 the rust-analyzer target folder is embedded in the base target folder so running cargo clean will also clean it. That part is not a concern. cargo-sweep doesn't pick it up, but it's not an official project anyway.

Ok, that makes sense as long as the proper warnings are kept. This shouldn't be conveyed as costless.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Book C-Content X-Contentious There are nontrivial implications that should be thought through
Projects
None yet
Development

No branches or pull requests

3 participants