diff options
author | Timothee Cour <timothee.cour2@gmail.com> | 2021-06-29 22:16:31 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-30 07:16:31 +0200 |
commit | 0483a5ffaf3284b6bfc51e2e08bbc1d5a57cd939 (patch) | |
tree | b807a8cb7d715ce35d02f65d4dd407c52c996ddb /compiler/passaux.nim | |
parent | afe5eb569b36ed310f6f93a33ae52274a6dce02e (diff) | |
download | Nim-0483a5ffaf3284b6bfc51e2e08bbc1d5a57cd939.tar.gz |
improvements to hint:processing: show import stack, distinguish nims, show includes etc (#18372)
* improvements to hint:processing * fix tests; do not show hintProcessing for nimscript unless given -d:nimHintProcessingNims * fix trunner and avoid need for -d:nimHintProcessingNims * fix some tests
Diffstat (limited to 'compiler/passaux.nim')
-rw-r--r-- | compiler/passaux.nim | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/compiler/passaux.nim b/compiler/passaux.nim index 87cb3a730..68b783248 100644 --- a/compiler/passaux.nim +++ b/compiler/passaux.nim @@ -19,18 +19,13 @@ type config: ConfigRef proc verboseOpen(graph: ModuleGraph; s: PSym; idgen: IdGenerator): PPassContext = - let conf = graph.config - result = VerboseRef(config: conf, idgen: idgen) - let path = toFilenameOption(conf, s.position.FileIndex, conf.filenameOption) - rawMessage(conf, hintProcessing, path) + # xxx consider either removing this or keeping for documentation for how to add a pass + result = VerboseRef(config: graph.config, idgen: idgen) proc verboseProcess(context: PPassContext, n: PNode): PNode = + # called from `process` in `processTopLevelStmt`. result = n let v = VerboseRef(context) - if v.config.verbosity == 3: - # system.nim deactivates all hints, for verbosity:3 we want the processing - # messages nonetheless, so we activate them again (but honor cmdlineNotes) - v.config.setNote(hintProcessing) - message(v.config, n.info, hintProcessing, $v.idgen[]) + message(v.config, n.info, hintProcessingStmt, $v.idgen[]) const verbosePass* = makePass(open = verboseOpen, process = verboseProcess) |