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

Simple pp output #524

Closed
wants to merge 2 commits into from
Closed

Conversation

patricoferris
Copy link
Collaborator

This is just an idea to share based on #517 -- changing the migrations run.t to use this was very useful for debugging more issues with the 5.2 AST bump cc @NathanReb.

We discussed (offline) the possibility of changing -dparsetree to output the Pp_ast output. We would need to understand the downstream use-cases of -dparsetree before doing that.

@patricoferris
Copy link
Collaborator Author

I think the "1,117" lines removed really speaks volumes for adding something like this to the driver. It saved me a lot of time debugging the migrations :))

Copy link
Collaborator

@NathanReb NathanReb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The output is incredibly easier to read and more compact, I wasn't expecting that much of an improvement over the sexp representation!

As you mentioned, I'll try to see if we can simply change the output of -dparsetree without having to introduce a new flag but if it turns out we can't this would be a worthy addition to the driver!

test/501_migrations/one_migration.t Outdated Show resolved Hide resolved
test/501_migrations/one_migration.t Outdated Show resolved Hide resolved
src/driver.ml Outdated Show resolved Hide resolved
patricoferris and others added 2 commits September 25, 2024 15:50
With -pp-simple drivers can print a simplified AST. This is useful
for debugging purposes. It is similar to the ppxlib-pp-ast tool
packaged with ppx-tools, but it is not configurable.

Signed-off-by: Patrick Ferris <[email protected]>
Co-authored-by: Nathan Rebours <[email protected]>
Signed-off-by: Patrick Ferris <[email protected]>
@patricoferris
Copy link
Collaborator Author

Closing in favour of #530

@patricoferris patricoferris deleted the pp-simple branch September 26, 2024 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants