Skip to content

Commit d72d982

Browse files
committed
fix tests; do not show hintProcessing for nimscript unless given -d:nimHintProcessingNims
1 parent 4eed6f5 commit d72d982

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

compiler/modulegraphs.nim

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -587,8 +587,11 @@ from std/strutils import repeat, `%`
587587

588588
proc onProcessing*(graph: ModuleGraph, fileIdx: FileIndex, moduleStatus: string, fromModule: PSym, ) =
589589
let conf = graph.config
590-
let path = toFilenameOption(conf, fileIdx, conf.filenameOption)
591-
let indent = ">".repeat(graph.importStack.len)
592-
let fromModule2 = if fromModule != nil: $fromModule.name.s else: "(toplevel)"
593-
let mode = if conf.isDefined("nimscript"): "(nims) " else: ""
594-
rawMessage(conf, hintProcessing, "$#$# $#: $#: $#" % [mode, indent, fromModule2, moduleStatus, path])
590+
let isNimscript = conf.isDefined("nimscript")
591+
if not isNimscript or conf.isDefined("nimHintProcessingNims"):
592+
# `nimHintProcessingNims` is un-documented for now, this could turn into a proper flag if needed
593+
let path = toFilenameOption(conf, fileIdx, conf.filenameOption)
594+
let indent = ">".repeat(graph.importStack.len)
595+
let fromModule2 = if fromModule != nil: $fromModule.name.s else: "(toplevel)"
596+
let mode = if isNimscript: "(nims) " else: ""
597+
rawMessage(conf, hintProcessing, "$#$# $#: $#: $#" % [mode, indent, fromModule2, moduleStatus, path])

0 commit comments

Comments
 (0)