-
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
Tracking Issue for remove-implicit-feature RFC 3491 #12826
Comments
@epage Do you want to take on implementation of this, or know someone who will? Or, if not, do you want to write mentoring instructions? I can probably do that if you don't. |
feat: Add a basic linting system This PR adds a basic linting system, the first step towards [User control over cargo warnings](#12235). To demonstrate the system, a lint for #12826 is added. It supports controlling cargo lints via the `[lints.cargo]` table. Lints can be controlled either by a group or individually. This is meant to lay down some fundamental infrastructure for the whole linting system and is not meant to be fully featured. Over time, features will be added that will help us reach a much more solid state.
@Muscraft and I have been talking about how to implement this. Instead of erroring in the 2024 Edition that an implicit feature was created, we are looking at treating it as an "unused optional dependency" warning. However, to truly be unused, no implicit feature should be created. So how do we avoid that implicit feature? Option 1: We strip unused optional dependencies before generating a
|
So this RFC implemetation can also fixed or mitgiate #10801 ? |
No, that is unrelated to what was being proposed to be stripped. |
…-obk Don't use implicit features in `Cargo.toml` in `compiler/` Fixes compiler crates to stop using implicit features (rust-lang/cargo#12826) which are denied in in edition 2024.
Rollup merge of rust-lang#127769 - compiler-errors:ed-2024-dep, r=oli-obk Don't use implicit features in `Cargo.toml` in `compiler/` Fixes compiler crates to stop using implicit features (rust-lang/cargo#12826) which are denied in in edition 2024.
The cargo team has decided to drop this from the 2024 edition. There are some implementation issues, and we feel that there is just too much risk trying to resolve it at such a late date. We will update here when we have decided what to do in the future. |
Summary
RFC: #3491
Implementation:
Documentation: TODO
Closes: #9088, #10125
Removes the implicit feature created for optional dependencies, requiring them to be explicitly stated in the
[features]
table withdep:foo
syntax.Note
This has been deferred out of the 2024 edition. More updates will come in the future.
Issues
cargo add --optional <dep>
create a<dep> = "dep:<dep>
feature #11010Unresolved
dep:foo
to thefoo
feature if it exists for unused optional dependencies #14017Future Extensions
No response
About tracking issues
Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
The text was updated successfully, but these errors were encountered: