-
Notifications
You must be signed in to change notification settings - Fork 234
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
refactor(AztecMacro): Refactor the macros to improve stability and readability #5080
Closed
Tracked by
#5077
Comments
Open
Thunkar
added a commit
that referenced
this issue
Mar 11, 2024
Partially addresses #5080 Until we have full macro support in noir, this PR aims to make using what we currently have a little bit less painful. The crate is now divided into utils of several kind (ast manipulation, error handling, hir manipulation...) and transforms. A transform is an end-to-end modification to the noir code that generates a valid compilation result from a given contract. This makes it easier to manipulate (and hopefully soon, replace) said modifications atomically, improving readability. This also modifies the first macro pass to iterate over all crates, not only the root one, which allows us to implement more stuff without having to dig deep into the def collector or (god forbid) the interner. The second macro pass has been renamed to `process_collected_defs`. Tried to generalize it a bit more, but providing a mutable ref for the whole `def_collector` turned out to be tricky without cloning `def_maps`, so it's staying like it is now.
AztecBot
added a commit
to noir-lang/noir
that referenced
this issue
Mar 11, 2024
Partially addresses AztecProtocol/aztec-packages#5080 Until we have full macro support in noir, this PR aims to make using what we currently have a little bit less painful. The crate is now divided into utils of several kind (ast manipulation, error handling, hir manipulation...) and transforms. A transform is an end-to-end modification to the noir code that generates a valid compilation result from a given contract. This makes it easier to manipulate (and hopefully soon, replace) said modifications atomically, improving readability. This also modifies the first macro pass to iterate over all crates, not only the root one, which allows us to implement more stuff without having to dig deep into the def collector or (god forbid) the interner. The second macro pass has been renamed to `process_collected_defs`. Tried to generalize it a bit more, but providing a mutable ref for the whole `def_collector` turned out to be tricky without cloning `def_maps`, so it's staying like it is now.
Closing this as it is in a good state for now. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Working with the macros can currently be quite painful and difficult. They should be refactor to improve the readability, and make it easier to participate in.
How this task will be solved greatly depends on what the timeline looks like for Noir Macros
The text was updated successfully, but these errors were encountered: