-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Add lint rule for #[deprecated]
on re-exports (rebase)
#142731
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
base: master
Are you sure you want to change the base?
Conversation
rustbot has assigned @WaffleLapkin. Use |
I strongly believe that this should just work. You should be able to deprecate reexports. I've talked with @jdonszelmann and we came up with a "plan" on how to implement that. I'm marking this as blocked. Either until this is properly supported and the lint is not needed, or until we decide that we can't support it and the list is needed. |
☔ The latest upstream changes (presumably #143845) made this pull request unmergeable. Please resolve the merge conflicts. |
@WaffleLapkin if there is enough of a gap before a solution, would it make sense to go ahead and report that it has no effect until then so people know they are writing deprecated messages that will be ignored? The lint is literally describing the current behavior and it seems like it would be fine to later remove that lint when there is an effect. |
@epage I'm not sure. I feel like adding a lint adds too much friction -- the warning will make people either remove the deprecation, or add an At the same time it will be some time before Jana and I can work on this and it will take some time to make a fix... So maybe a warning makes sense. 🤷🏻 |
In case this is relevant, the reason I thought it might be worthwhile is as a library author, I assume my deprecation messages show up and write my library and my changelog assuming that. As a recent example (but with #47237), I had someone complaining about unspecified breaking changes in a library of mine because I had thought my umbrella statement "deprecated items were removed" was sufficient when in reality, they existed only in the code and users never saw them. If I had known about #47237, I would have worked around it by writing wrapper functions where possible like I do for #30827 which I mostly know of because of the number of times it has bitten me. |
I see your point. I agree, for users who don't know about this footgun (I assume most users don't), it would be nice to warn them. After I thought about it for a couple days, I think I'd be in favor of adding this warning. |
Rebase of #132038
Original description:
Closes #142436 (I think)