Feature Request: A way to deprecate features
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 15.5k
- Forks
- 3k
- Avg merge
- 23h 30m
- Merged PRs (30d)
- 51
Description
I have a crate that has a feature that is no longer needed. For now, I keep the feature, but it does nothing. I will at some point remove the feature, but I'd like to be able to issue a warning before removing it.
An easy an approachable way would be to nominate a special "deprecated" feature that is always available, so we could write my_feature = "deprecated"in our Cargo.toml. However, this would need a survey of crates to see if any already define such a feature.
Another option is to stabilize the proc_macro_diagnostics feature in rustc, that would allow us to issue a compile-time warning if the feature is selected, albeit with more ceremony.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source files or tests are named. Start by examining Cargo feature handling and the Cargo.toml feature syntax, then compare the proposed always-available "deprecated" feature with stabilizing rustc's proc_macro_diagnostics; done requires an agreed design and implementation path for warning users before feature removal.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100