-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Activate features of individual crates in a cargo workspace #10298
Comments
Note that there's the same issue with |
Related to #8521 This is a big problem for us - we have a few mutually incompatible features (for relatively legitimate reasons) -- and a workspace with many crates with different features. But enabling any feature with eg:
Works fine when running analysis over the whole workspace*, but errors when running tests under a particular project which doesn't support that flag. As a workaround, you can add an empty dummy feature to each individual cargo project, but it's not ideal. (*) this is not strictly true - using The following would all be sufficient fixes to serve our needs :) - in, I'm guessing, increasing order of work:
|
#14910 addresses this for single workspace projects. Multi workspaces still suffer here |
Does it? That just prevents feature |
It fixes this scenario, I didn't realize the overall ask was for per crate feature toggles apologies. |
Currently, the only two options for cargo features in rust-analyzer are "all features" and "list of features". If you're in a cargo workspace, the "list of features" seems to apply to all crates, which breaks certain workflows when working in those crates (in particular, the "▷Run Test" inline buttons). There should be a way to apply designate specific crates to apply features in the project settings.
The text was updated successfully, but these errors were encountered: