improvements to hint:processing: show import stack, distinguish nims, show includes etc #18372
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
hint:processing
is very useful during debugging; this PR improves it further:(nims)
prefix for files processing during nimscript processing to avoid confusion(toplevel)
) and the import stack depth (with>
); this makes it easy to trace how we got to process a given file by simply lookup up the import stackverboseProcess
(which showed a hintProcessing for each top-level statement) wasn't working since a while ago; after this PR it now works again; and you can show those without verbosity:3 (which is very verbose), instead you can use a newhint:processingstmt
example snippet
full example
nim c --hint:all:off --warnings:off --processing:filenames --skipusercfg --skipparentcfg compiler/nim
before PR
https://gist.github.com/timotheecour/f9152b92c537596d04b2f08bf67f32ed
after PR
https://gist.github.com/timotheecour/af72c7f3f4cdeb039c2f8d2ab57c9776