Skip to content

Add layout printers to the debugger and autogenerate tools/debug_printer#3

Merged
antalsz merged 2 commits intounboxed-annotate-layouts-at-end-of-errorsfrom
unboxed-improve-debug-printers
Mar 13, 2023
Merged

Add layout printers to the debugger and autogenerate tools/debug_printer#3
antalsz merged 2 commits intounboxed-annotate-layouts-at-end-of-errorsfrom
unboxed-improve-debug-printers

Conversation

@antalsz
Copy link
Copy Markdown
Owner

@antalsz antalsz commented Mar 3, 2023

This improves the UX for working with the debugger

Copy link
Copy Markdown

@goldfirere goldfirere left a comment

Choose a reason for hiding this comment

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

I'm very happy to have more debug printers installed. I'm a little less convinced about the automation to refresh debug_printers: it constrains the way we write debug_printers.ml in a way that may prove annoying and counterintuitive later, for very little savings. And when things break, fixing it requires knowledge of awk. (Maybe that's widespread?)

In particular, I believe @ncik-roberts recently added something to debug_printers.ml that does not conform to this specification (in a branch). Is that accurate? But maybe it's better to put the printing code right in the compiler anyway? I'm really on the fence here.

@ncik-roberts
Copy link
Copy Markdown

I don't think that the debug printer I added will be problematic for Antal's change. It follows the format of other printers we list in debug_printers.ml.

@antalsz
Copy link
Copy Markdown
Owner Author

antalsz commented Mar 10, 2023

I improved this by causing the automation to look only for lines that start with "let ", and added a comment to tools/debug_printers.ml, which per conversation with @goldfirere should address the concerns

Copy link
Copy Markdown

@goldfirere goldfirere left a comment

Choose a reason for hiding this comment

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

After merging, please put a PSA to the type systems group that this behavior has changed.

Looks good!

@antalsz antalsz force-pushed the unboxed-annotate-layouts-at-end-of-errors branch from 1df0b4a to 3fa5761 Compare March 13, 2023 21:12
@antalsz antalsz force-pushed the unboxed-improve-debug-printers branch from 7e1bd64 to faf1a53 Compare March 13, 2023 21:15
@antalsz antalsz merged commit ed6d4c2 into unboxed-annotate-layouts-at-end-of-errors Mar 13, 2023
@antalsz
Copy link
Copy Markdown
Owner Author

antalsz commented Mar 13, 2023

I'll put out the PSA after ocaml-flambda#148 merges 👍

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.

3 participants