-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Implicit Inheritance for Workspapce Inheritance #12208
Comments
I feel like we need to gather use cases to decide if this is even worth it, so I've created this as a place to gather them. |
We'd like to have this feature because that the moment having to opt-in to Ideally we can just force the clippy lints for the entire workspace & project so that we don't have to keep this in mind and we can just set it once. It's how we're currently using / abusing the |
Not great but a workaround would be to have a tool that errors if a workspace member does not have it inherited. With #12235, that could be integrated as a cargo lint that is on by default. If we had general implicit inheritance, we'd need a way to override it. Take Say we don't want to go down that route, we'd then need to decide if we're ok with implicit inheritance being section by section. I feel like that could lead to its own confusion. We also need to consider what routes (and their likelihood) we might want to take workspace inheritance. At least for |
For lints at least I feel like having explicit pushing from the workspace would work fine in most cases, it doesn't need to be implicit if you only have to configure it in one spot. |
@Muscraft and I did some brainstorming on this. Inspired by the inherits = true
[package]
name = "foo"
...
With a new edition, we could have a One future possibility to keep in mind is the idea of workspace inheritance of sets/groups. These are sets of inheritable fields that you can opt-in on a named basis [workspace.group.public.package]
rust-version = "1.60.0"
edition = "2018"
[workspace.group.internal.package]
inherits = "some-other-group"
rust-version = "1.73.0"
edition = "2021"
[package]
name = "foo"
rust-version.workspace = "internal"
edition.workspace = "internal" inherits = "public"
[package]
name = "bar"
|
Maybe |
After re-reading, I had an idea for how use cases that include example crates could benefit without an edition bump: Treat |
For myself, I dislike downgrading |
Problem
The workspace inheritance RFC deferred inheriting-by-default to not get in the way of merging a minimal solution
Use cases
Proposed Solution
Possibilities:
Notes
No response
The text was updated successfully, but these errors were encountered: