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 vmutils.debugNimNode, allows using astalgo.debug in user code #18597

Closed
wants to merge 2 commits into from

Conversation

timotheecour
Copy link
Member

@timotheecour timotheecour commented Jul 27, 2021

intended to help investigate compiler issues, which to this day remains difficult and time consuming.

macros.treeRepr is still what should be used for regular users, but treeRepr is a lossy representation, and oftentimes to debug issues you need access to the full PNode fields (recursively), which (currently) is the most faithfully rendered via astalgo.debug which doesn't hide fields (eg flags, comment field etc); this PR allows exposing it in user code so that recompiling the compiler isn't needed (which is time consuming in a multi edit-debug session)

Here's how debugutils relates to vmutils:

  • compiler/debugutils.nim: importable from compiler code
  • std/vmutils.nim: importable from user code

future work

@timotheecour timotheecour changed the title add vmutils.debugNimNode add vmutils.debugNimNode, allows using astalgo.debug in user code Jul 27, 2021
@timotheecour timotheecour added the Ready For Review (please take another look): ready for next review round label Jul 27, 2021
@timotheecour
Copy link
Member Author

PTAL

@stale
Copy link

stale bot commented Jul 30, 2022

This pull request has been automatically marked as stale because it has not had recent activity. If you think it is still a valid PR, please rebase it on the latest devel; otherwise it will be closed. Thank you for your contributions.

@stale stale bot added the stale Staled PR/issues; remove the label after fixing them label Jul 30, 2022
@stale stale bot closed this Sep 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready For Review (please take another look): ready for next review round stale Staled PR/issues; remove the label after fixing them
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants