-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Remove pretty-print compat hack for all crates #93275
Conversation
r? @jackh726 (rust-highfive has picked a reviewer for you, use r? to override) |
r? @ghost |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 9f93af4f89973b09bf98a5f48fbb15f9466d5eab with merge 91c0623519feeb52387fd0c3677ece4d24642b73... |
☀️ Try build successful - checks-actions |
Queued 91c0623519feeb52387fd0c3677ece4d24642b73 with parent 51126be, future comparison URL. |
Finished benchmarking commit (91c0623519feeb52387fd0c3677ece4d24642b73): comparison url. Summary: This benchmark run did not return any relevant changes. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR led to changes in compiler perf. @bors rollup=never |
@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
|
cc @rust-lang/lang @petrochenkov I propose that we remove this hack. The description of this PR contains a description of what this does, and what the expected fallout from removing this is. If the amount of fallout is still judged to be too high, then I think we could 'partially' remove this - disable the hack on nightly, but revert it on beta. This should help catch any actively maintained projects that are depending on this (and are ignoring the cargo future-incompat-report message), while keeping our stable releases 'stable' for a little while longer. |
Over a year seems like long enough to keep a "we were being nice" hack to me; let's see what everyone else thinks. EDIT: Oh, this is marked compiler, despite the cc. Who should decide on it? |
I think changes to the proc-macro infrastructure are generally handled by the compiler team. However, this will result in some amount of ecosystem breakage, so I wanted to see if the lang team had any objections. |
The future compatibility lint support will only land in 1.59 in Cargo, right? So stable users aren't seeing those warnings yet? Can you confirm that in all cases (as found by Crater) we expect a cargo update -p some-crate to fix the issue? Can we change to a hard error, but with that recommendation for a cycle or so? In any case, it would be great to have the PR description contain the instructions for each case in a short snippet we can copy into release notes. |
☀️ Try build successful - checks-actions |
@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
|
@Aaron1011 I assume you'll triage the crater run and figure out if we can land this |
🚨 Error: missing desired crates: {"https://crater-reports.s3.amazonaws.com/pr-93275/retry-regressed-list.txt"} 🆘 If you have any trouble with Crater please ping |
👌 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
|
Any progress on this? Removing the pretty-print hack would remove one of the last two instances of Token::Interpolated. |
Closing this as the crater run still needs to be triäged and it's inactive for a while now |
This PR removes the pretty-printing hack that changed how we printed types named
ProceduralMasqueradeDummyType
. This was added in #73345, to avoid causing widespread ecosystem breakage in the ecosystem while making a change to proc-macro invocation,It's been around a year and a half, and all of the affected crates have new versions out which no longer require this hack to compile. The crater run in #93275 (comment) (https://crater-reports.s3.amazonaws.com/pr-93275/index.html) shows three sources of regressions:
rental
crate - while this crate is now unmaintained, its final versions0.5.6
has a fix that allows us to compile without this hack. All affected crates should be able to bump theirCargo.lock
to the latest version.cssparser
crate - this crate is still maintained, and all recent versions no longer depend onprocedural-masquerade
(which is what panicked without this workaround).allsorts-rental
- this appears to be a fork ofrental
created by theallsorts
projects (Make allsorts run on no_std yeslogic/allsorts#42). Confusingly, it has a version called0.5.6
which is not the same asrental
0.5.6. However, theallsorts
project no longer depends onrental
since yeslogic/allsorts@7b51ea8, so I think this crate is essentially a legacy from crates that haven't yet updated theirCargo.lock
Unfortunately, there are still 231 crates that transitively depend on one of these 3 crates. The vast majority of these crates appear to be small personal projects with their
Cargo.lock
committed. At this point, I think that waiting longer won't decrease the amount of breakage - the authors of these crates are probably not running the latest Rust, and will therefore not see the future-incompat-report message.