Remix.run Logo
estebank 2 days ago

There was an experimental PR that treats proc macros as idempotent with the corresponding colpike speed up. I don't know what happened with it, and stabilization required a lot of design work to not break backcompat. But this is something in the team's radar.

staticassertion 2 days ago | parent | next [-]

Would it be possible to do somethign like editions for proc macros, or have crates establish "this is a v2 proc macro" or something? There are a lot of things I'd love to see change in a v2 but it'd all be breaking.

estebank 2 days ago | parent [-]

Yes, I think here are workable designs.

mmastrac 2 days ago | parent | prev | next [-]

Do you have a link for this one? Would love to see it.

estebank 2 days ago | parent [-]

This is not the one I remember but another one that does part of what I'm describing.

https://github.com/rust-lang/rust/pull/145354

NooneAtAll3 2 days ago | parent | prev [-]

what do you mean by idempotent and colpike?

estebank 2 days ago | parent [-]

Idempotent as in if the token stream in the input doesn't change, the cached result of the previous macro expansion is used during incremental, instead of being pessimistic and rerunning the macro.

Colpike as in compile typo.