You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 3, 2024. It is now read-only.
thanks for this crate, it really helps optimizing macro performance and even allows for things which were not possible without shared state between macro calls!
While building my macros a question occurred: Is there a way to build some form of macro dependency order? E.g. I have a proc derive macro that reads and saves the field names of a struct into my state. Later I want to use a macro to build a query fot a database call and I need to know the field names. The second macro depends on the first one. Is there some way to make the compiler wait for the data to be available? E.g. by some polling mechanism? Do you happen to know if the compiler is running in parallel so I can block the execution of one macro to wait for the other to finish? Thanks!
The text was updated successfully, but these errors were encountered:
So I would say this crate is highly deprecated and relies on some undefined behavior in the compiler so is quite likely to break in random circumstances. A much better, safer pattern is usually to do something like the outer macro pattern + my macro_magic crate
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
thanks for this crate, it really helps optimizing macro performance and even allows for things which were not possible without shared state between macro calls!
While building my macros a question occurred: Is there a way to build some form of macro dependency order? E.g. I have a proc derive macro that reads and saves the field names of a struct into my state. Later I want to use a macro to build a query fot a database call and I need to know the field names. The second macro depends on the first one. Is there some way to make the compiler wait for the data to be available? E.g. by some polling mechanism? Do you happen to know if the compiler is running in parallel so I can block the execution of one macro to wait for the other to finish? Thanks!
The text was updated successfully, but these errors were encountered: