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
This commit is contained in:
parent
afe5eb569b
commit
0483a5ffaf
8 changed files with 29 additions and 19 deletions
|
|
@ -582,3 +582,15 @@ proc moduleFromRodFile*(g: ModuleGraph; fileIdx: FileIndex;
|
|||
|
||||
proc configComplete*(g: ModuleGraph) =
|
||||
rememberStartupConfig(g.startupPackedConfig, g.config)
|
||||
|
||||
from std/strutils import repeat, `%`
|
||||
|
||||
proc onProcessing*(graph: ModuleGraph, fileIdx: FileIndex, moduleStatus: string, fromModule: PSym, ) =
|
||||
let conf = graph.config
|
||||
let isNimscript = conf.isDefined("nimscript")
|
||||
if (not isNimscript) or hintProcessing in conf.cmdlineNotes:
|
||||
let path = toFilenameOption(conf, fileIdx, conf.filenameOption)
|
||||
let indent = ">".repeat(graph.importStack.len)
|
||||
let fromModule2 = if fromModule != nil: $fromModule.name.s else: "(toplevel)"
|
||||
let mode = if isNimscript: "(nims) " else: ""
|
||||
rawMessage(conf, hintProcessing, "$#$# $#: $#: $#" % [mode, indent, fromModule2, moduleStatus, path])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue