Stream: t-lang/pub-macro-rules

Topic: migration work


view this post on Zulip nikomatsakis (Feb 12 2021 at 14:08):

@Santiago Pastorino I would suggest you start by reading the draft RFC that @rylev wrote, and maybe perusing the PR from @Vadim Petrochenkov -- I think the main work that needs doing is working on the migration

view this post on Zulip nikomatsakis (Feb 12 2021 at 14:09):

it occurs to me that we're going to need to land @Vadim Petrochenkov's PR first, with feature gate

view this post on Zulip nikomatsakis (Feb 12 2021 at 14:09):

because you can't do the migration unless you have pub(foo) working on macro-rules

view this post on Zulip rylev (Feb 12 2021 at 14:20):

@Vadim Petrochenkov's PR had it behind a feature flag. We probably can just reopen that PR and make sure it works properly across crates

view this post on Zulip rylev (Feb 12 2021 at 14:25):

@Santiago Pastorino let me know how you want to distribute this work

view this post on Zulip Santiago Pastorino (Feb 12 2021 at 14:49):

@rylev no idea, but I'm going to read the issue later and we can discuss I guess

view this post on Zulip Santiago Pastorino (Feb 12 2021 at 14:49):

if you have ideas on how to split let me know too :)

view this post on Zulip Santiago Pastorino (Feb 12 2021 at 21:32):

sorry but I didn't have the time I expected today

view this post on Zulip Santiago Pastorino (Feb 12 2021 at 21:34):

anyway, I was reading @rylev's RFC and I guess, first of all what Niko suggest seems good to me

view this post on Zulip Santiago Pastorino (Feb 12 2021 at 21:36):

first step would be to land @Vadim Petrochenkov's PR

view this post on Zulip Santiago Pastorino (Feb 12 2021 at 21:36):

nikomatsakis said:

it occurs to me that we're going to need to land Vadim Petrochenkov's PR first, with feature gate

unsure why did you explicitly mention feature gate there, isn't already under a feature gate? or what did you mean?

view this post on Zulip Santiago Pastorino (Feb 12 2021 at 21:37):

after that I guess we could make a list of things that would need migration

view this post on Zulip Santiago Pastorino (Feb 12 2021 at 21:37):

what's the use case and what/how to migrate that

view this post on Zulip Santiago Pastorino (Feb 12 2021 at 21:37):

still reading the RFC, but I guess the RFC already have that information (reading ...)

view this post on Zulip Santiago Pastorino (Feb 12 2021 at 21:37):

I see there's:

view this post on Zulip Santiago Pastorino (Feb 12 2021 at 21:38):

Usage in submodules

view this post on Zulip Santiago Pastorino (Feb 12 2021 at 21:39):

there's a clear way to migrate there

view this post on Zulip Santiago Pastorino (Feb 12 2021 at 21:40):

Fixing this requires annotating macro invocations with the path to the parent module where the macro is defined or adding a use statement (though this may lead to name clashing).

view this post on Zulip Santiago Pastorino (Feb 12 2021 at 21:41):

how would a use statement produce name clashing?

view this post on Zulip Santiago Pastorino (Feb 12 2021 at 21:42):

I meant, given that the RFC splits between usage in submodules from shadowing

view this post on Zulip Santiago Pastorino (Feb 12 2021 at 21:42):

ohh I see :)

view this post on Zulip Santiago Pastorino (Feb 12 2021 at 21:43):

I guess I was confused by the context

view this post on Zulip Santiago Pastorino (Feb 12 2021 at 21:45):

anyway, migration plan there would be by using super? or maybe better something like crate::m1::my_macro!?

view this post on Zulip Santiago Pastorino (Feb 12 2021 at 21:46):

ohh I see there's https://github.com/rylev/rust-rfcs/blob/pub-macro-rules/text/0000-pub-macro-rules.md#summary-of-fixes :)

view this post on Zulip Santiago Pastorino (Feb 12 2021 at 21:46):

need to leave but will finish reading it later

view this post on Zulip Santiago Pastorino (Feb 12 2021 at 21:47):

Santiago Pastorino said:

anyway, migration plan there would be by using super? or maybe better something like crate::m1::my_macro!?

still unsure why not using this instead of super

view this post on Zulip rylev (Feb 15 2021 at 12:49):

@Santiago Pastorino there are likely some holes in the migration plan. It has been thoroughly vetted yet, and there might be ways to improve it.

view this post on Zulip Santiago Pastorino (Feb 15 2021 at 12:57):

btw, we're on holidays here, will be back on wednesday and try to work a bit on this, we may want to do a little plan I guess

view this post on Zulip rylev (Feb 15 2021 at 13:01):

Yes, let's make a plan when you're back. Enjoy your holiday!

view this post on Zulip Santiago Pastorino (Feb 15 2021 at 13:02):

thanks!

view this post on Zulip Santiago Pastorino (Feb 18 2021 at 21:22):

@rylev should we make a plan?

view this post on Zulip Santiago Pastorino (Feb 18 2021 at 21:23):

let me know if you want to do this focused on a zulip/zoom meeting? or we can also do it async

view this post on Zulip rylev (Feb 19 2021 at 08:32):

@Santiago Pastorino sorry I had signed for the day already when you wrote. I’d like to make a plan. Let me know when you’re available to discuss

view this post on Zulip Santiago Pastorino (Feb 19 2021 at 12:18):

@rylev no worries we can do it on monday or whenever you are available

view this post on Zulip rylev (Feb 19 2021 at 12:47):

@Santiago Pastorino I'm available at

view this post on Zulip Santiago Pastorino (Feb 19 2021 at 12:52):

ok it works for me

view this post on Zulip Santiago Pastorino (Feb 19 2021 at 14:02):

@rylev let me know when you're around and how would you like to proceed

view this post on Zulip rylev (Feb 19 2021 at 14:08):

I'll write you a private message so we don't spam this topic


Last updated: Jan 26 2022 at 08:02 UTC