-
Notifications
You must be signed in to change notification settings - Fork 14k
resolve: Preserve ambiguous glob reexports in crate metadata #147984
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 @jdonszelmann. Use |
|
@bors try |
resolve: Preserve ambiguous glob reexports in crate metadata
This comment has been minimized.
This comment has been minimized.
|
@craterbot check |
|
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
|
🚧 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
|
🎉 Experiment
Footnotes
|
|
That's a lot of breakage. |
So in cross-crate scenarios they can work in the same way as in crate-local scenarios.
aa2fb6e to
e388d62
Compare
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
@bors try
|
This comment has been minimized.
This comment has been minimized.
resolve: Preserve ambiguous glob reexports in crate metadata
|
We talked about this and ended up liking it. This preserves what I might call "ambiguity monotonicity" -- adding ambiguity should never reduce ambiguity warnings. We'd also like to see a def-site warning about these cases paired with this -- in this PR or otherwise concurrently -- if possible. @rfcbot fcp merge |
|
Team member @traviscross has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! cc @rust-lang/lang-advisors: FCP proposed for lang, please feel free to register concerns. |
|
@rfcbot reviewed |
|
FWIW I'd personally like to see that proposed additional warning be in a separate PR, not mixed into this one. I do want to see that warning too, though. |
|
I think a def-site warning is important to "shift left" failures like this. We won't be catching cases where the ambiguity comes from a dependency adding an item in a subsequent version. @nikomatsakis made a suggestion to lint anytime we glob export from two different crates, which I liked. Otherwise, we can at least catch cases where there is a known conflict at the time of writing the code. @rfcbot reviewed |
|
🔔 This is now entering its final comment period, as per the review above. 🔔 |
We already have a lint for this - https://doc.rust-lang.org/rustc/lints/listing/warn-by-default.html#ambiguous-glob-reexports |
Is there some decision on this ^^^ ? |
|
The FCP, as proposed, is to accept that soft breakage. (I.e., "soft breakage" due to this being from a deny-by-default lint, that could be allowed and is affected by |
Thanks. Yes, that is the lint we were looking for. |
|
☔ The latest upstream changes (presumably #148544) made this pull request unmergeable. Please resolve the merge conflicts. |
|
The final comment period, with a disposition to merge, as per the review above, is now complete. As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed. This will be merged soon. |
So in cross-crate scenarios they can work in the same way as in crate-local scenarios.
Resurrection of #114682.
One of unblocking steps for #145108.
Fixes #36837.