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

Single-package mode #11181

Open
Tracked by #86
matklad opened this issue Jan 3, 2022 · 1 comment
Open
Tracked by #86

Single-package mode #11181

matklad opened this issue Jan 3, 2022 · 1 comment
Labels
C-feature Category: feature request

Comments

@matklad
Copy link
Member

matklad commented Jan 3, 2022

Today rust-analyzer unconditionally operates on the whole workspace, even if you open a subfolder of the workspace with a single package. It might be reasonable to scope the work to a single package in such cases.

The tradeoff here is:

  • when you open a single package, refactors don't work across the workspace
  • but ra needs to cargo check a single package only, which is especially helpful if the overall build is broken

I haven't thought too deeply how this all should work exactly.

related user request: #10730

Relevant code:

https://github.com/rust-analyzer/rust-analyzer/blob/1ba9a924d7b161c52e605e157ee16d582e4a8684/crates/project_model/src/workspace.rs#L139-L145

https://github.com/rust-analyzer/rust-analyzer/blob/1ba9a924d7b161c52e605e157ee16d582e4a8684/crates/project_model/src/lib.rs#L84

@matklad matklad added the C-feature Category: feature request label Jan 3, 2022
@bjorn3
Copy link
Member

bjorn3 commented Jan 3, 2022

It would also be nice to allow a subset of a workspace. For example in https://github.com/bytecodealliance/wasmtime I often only work on Cranelift which has all crates in the cranelift directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature Category: feature request
Projects
None yet
Development

No branches or pull requests

2 participants