-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Deprecate using rustc_plugin without the rustc_driver dylib. #62727
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
r? @Zoxc |
How does this trickery work? |
At this point I think we should look to remove the plugin support from rustc. |
@Zoxc Do you mean this PR? At first I tried adding Or do you mean the bug that it fixes? I’m not sure exactly. It looks like on Windows and macOS, failing to depend on the appropriate @Centril On one hand, we’ve arguably already been at that point for a couple years. On the other hand, Servo’s memory safety unfortunately still depends on a custom lint that checks that GC pointers on the stack are properly rooted: https://github.com/servo/servo/tree/cef98d2e5179/components/script_plugins I would love to find another solution, this plugin is regularly giving us headaches. But until we do, if the plugin API is removed Servo will be unable to upgrade and will be stuck on an old Rust Nightly. |
So there has been no movement since last time we discussed this. That's unfortunate. At some point however, I think it stops being reasonable for rustc to indefinitely maintain the plugin interface solely for the benefit of servo. What would it take to get rid of your reliance on this? |
I’ve opened #62868 to discuss this, as I feel it doesn’t need to block this PR. |
@Zoxc friendly review ping |
☔ The latest upstream changes (presumably #62086) made this pull request unmergeable. Please resolve the merge conflicts. |
9aa111e
to
2025965
Compare
☔ The latest upstream changes (presumably #63029) made this pull request unmergeable. Please resolve the merge conflicts. |
Ping from triage: @Zoxc, waiting on your review. And @SimonSapin, you should resolve merge conflicts. |
Ping from triage: @Zoxc, any update on the review? |
2025965
to
8ac220b
Compare
@rust-lang/compiler, can anyone else review this? |
doctest = false | ||
|
||
[dependencies] | ||
rustc_plugin_ = { path = ".." } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this compatibility shim is necessary.
rustc_plugin
is almost unused at this point, so it should be ok to make people to migrate to rustc_driver::plugin
in one step.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That’s fair, but now that the shim is already implemented it’s the same amount of work to remove it now or later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is merged now, I'll have to make a PR removing it myself once this PR lands, I don't want to do that + I'd prefer some pointless back and forth to not exist in git history.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see, Cargo uses it, and we cannot land this PR with broken cargo.
Ok, let's land this with the shim.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Breaking extern crate rustc_plugin;
in the same PR as we make its replacement available means that Clippy and RLS will be broken for a few Nightlies until we can get the multi-repo coordination dance together. This doesn’t sound great when it’s easily avoided.
If you’d like I can be on the hook for making the follow-up PR that removes the deprecated shim later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you’d like I can be on the hook for making the follow-up PR that removes the deprecated shim later.
Yeah, that would be great.
@SimonSapin
Otherwise this looks good. |
@bors r=petrochenkov |
📌 Commit d0bbc60 has been approved by |
☀️ Test successful - checks-azure |
Tested on commit rust-lang/rust@d8d99ba. Direct link to PR: <rust-lang/rust#62727> 💔 rls on windows: test-pass → build-fail (cc @Xanewok, @rust-lang/infra). 💔 rls on linux: test-pass → build-fail (cc @Xanewok, @rust-lang/infra).
Import rustc_plugin from its new location Depends on rust-lang/rust#62727 changelog: none
It was accidentally removed in a rebase of rust-lang#62727 Fixes rust-lang#63729
Restore the rustc_plugin crate in the sysroot It was accidentally removed in a rebase of rust-lang#62727 Fixes rust-lang#63729 (rls build failure)
Restore the rustc_plugin crate in the sysroot It was accidentally removed in a rebase of rust-lang#62727 Fixes rust-lang#63729 (rls build failure)
Restore the rustc_plugin crate in the sysroot It was accidentally removed in a rebase of rust-lang#62727 Fixes rust-lang#63729 (rls build failure)
2. Up version.
Tests: Import rustc_plugin from its new location CC rust-lang/rust#62727
rustc_plugin: Remove the compatibility shim The compatibility crate was introduced in rust-lang#62727 to migrate Cargo and some other tools, but now it's no longer necessary.
rustc_plugin: Remove the compatibility shim The compatibility crate was introduced in rust-lang#62727 to migrate Cargo and some other tools, but now it's no longer necessary.
CC #59800, 7198687
Fix #62717