Skip to content

Print more useful debug output#9

Merged
sgrif merged 1 commit into
mainfrom
sg-useful-debug-output
Jun 25, 2026
Merged

Print more useful debug output#9
sgrif merged 1 commit into
mainfrom
sg-useful-debug-output

Conversation

@sgrif

@sgrif sgrif commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Prior to this commit, we were deriving Debug, which would just print the address of any pointers. Since the vast majority of interesting fields on nodes are pointers, this wasn't especially useful. We now write a manual debug output, printing the result of our generated method calls as if they were the field values. We also skip fields like parseloc and type_, which are only useful to PG internally and aren't useful in consuming code.

Prior to this commit, we were deriving Debug, which would just print the
address of any pointers. Since the vast majority of interesting fields
on nodes are pointers, this wasn't especially useful. We now write a
manual debug output, printing the result of our generated method calls
as if they were the field values. We also skip fields like `parseloc`
and `type_`, which are only useful to PG internally and aren't useful in
consuming code.
@sgrif sgrif merged commit e74ad4d into main Jun 25, 2026
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.

1 participant