Stream: t-compiler

Topic: Removing `Register::register_macro` compiler extension point


matklad (Sep 03 2019 at 18:32, on Zulip):

Now that we have proc macros, I wonder if it makes sense to remove this extension point: it seems like it doesn't unlock any additional powers.

However, it's only a convenience wrapper over register_syntax_extension, and that does have some additional knobs. But perhaps we remove the more general thing as well, as those knobs seem very rustc specific.

Context: https://github.com/rust-lang/rust/pull/64041 fails due to the change in this interface, and I am waiting for the the stage2 compiler to build to test my fix for the test :)

Vadim Petrochenkov (Sep 03 2019 at 20:24, on Zulip):

Probably after fixing https://github.com/rust-lang/rust/issues/64132.

Vadim Petrochenkov (Sep 03 2019 at 20:24, on Zulip):

(Right now it's also used as an internal helper.)

matklad (Sep 21 2019 at 18:57, on Zulip):

@Vadim Petrochenkov #64132 was fixed. Do we have an issue to track removal of register_macro/register_syntax_extension?

simulacrum (Sep 21 2019 at 18:58, on Zulip):

I think checking that servo isn't using them (I think probably the answer is no -- they're mostly using plugins for lints I believe)

simulacrum (Sep 21 2019 at 18:58, on Zulip):

Once that's done I think we should just remove them (presuming we don't have uses ourselves, which I think is true)

matklad (Sep 21 2019 at 18:59, on Zulip):

We'll need at least to change compiler pluging example in the book: it's a roman-numerals macro at the moment

simulacrum (Sep 21 2019 at 19:00, on Zulip):

I would personally r+ a PR that changes that to say "Plugins will be removed entirely at some point in the future" and remove the example.

centril (Sep 21 2019 at 19:26, on Zulip):

I think we should emit a warning or something when the plugin interface is used

Vadim Petrochenkov (Sep 21 2019 at 20:10, on Zulip):

https://www.youtube.com/watch?v=ussCHoQttyQ

simulacrum (Sep 21 2019 at 20:15, on Zulip):

@centril Coding that up seems like it's not worth the effort

simulacrum (Sep 21 2019 at 20:15, on Zulip):

It's already really painful to do so

centril (Sep 21 2019 at 20:42, on Zulip):

@simulacrum idk, folks show up every now and then on internals and talk about their plugin

simulacrum (Sep 21 2019 at 20:55, on Zulip):

I would be fine replacing the feature gate with servo_plugin or so since they're the only use case we're waiting on to rip them out (and someone should really convince them to move over to their own rustc -- I've even been thinking about suggesting that we pull in their lints to rustc proper as a servo::foo lint, and unstable)

Last update: Nov 22 2019 at 04:45UTC