Skip to content
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

Add flag to print out program after comptime expressions have been evaluated #5168

Closed
Tracked by #4594
jfecher opened this issue Jun 4, 2024 · 0 comments · Fixed by #5192
Closed
Tracked by #4594

Add flag to print out program after comptime expressions have been evaluated #5168

jfecher opened this issue Jun 4, 2024 · 0 comments · Fixed by #5192
Assignees
Labels
enhancement New feature or request

Comments

@jfecher
Copy link
Contributor

jfecher commented Jun 4, 2024

Problem

With metaprogramming, it can be difficult to find out what the compiler sees of a program after it is modified by various comptime functions.

Happy Case

We should add a compiler flag to print the program to stdout after each comptime expression has been evaluated.

As part of this compiler flag there can be a required argument for the module path of the module to print. This allows us to only print a single module rather than the entire program.

Project Impact

None

Impact Context

No response

Workaround

None

Workaround Description

No response

Additional Context

No response

Would you like to submit a PR for this Issue?

None

Support Needs

No response

@jfecher jfecher added the enhancement New feature or request label Jun 4, 2024
github-merge-queue bot pushed a commit that referenced this issue Jul 10, 2024
# Description

## Problem\*

Resolves #5168

## Summary\*



## Additional Context

- Restores `hir_to_ast` pass as `hir_to_display_ast` from
https://github.com/noir-lang/noir/pull/5147/files
+ Only using it for display is much easier than trying to go back and
forth between HIR and the AST

## Documentation\*

Check one:
- [x] No documentation needed.
- [ ] Documentation included in this PR.
- [ ] **[For Experimental Features]** Documentation to be submitted in a
separate PR.

# PR Checklist\*

- [x] I have tested the changes locally.
- [x] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.

---------

Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
Co-authored-by: jfecher <jake@aztecprotocol.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants