compiler/msgs: Default to stderr for diagnostics
Previously we were defaulting to stdout for diagnostics, which could interfere with scripts or `nim c -r' programs outputting their results to stdout, possibly mixing their output with compiler messages. This change makes now Nim to be inline with other compilers emitting diagnostics to stderr. Also now --stdout option has proper meaning making all diagnostics to be sent to stdout instead. NOTE: Tester now calls compiler with --stdout.
This commit is contained in:
parent
2bc6acc808
commit
abb82554b7
2 changed files with 23 additions and 18 deletions
|
|
@ -292,7 +292,8 @@ proc testSpec(r: var TResults, test: TTest) =
|
|||
case expected.action
|
||||
of actionCompile:
|
||||
var given = callCompiler(expected.cmd, test.name,
|
||||
test.options & " --hint[Path]:off --hint[Processing]:off", test.target)
|
||||
test.options & " --stdout --hint[Path]:off --hint[Processing]:off",
|
||||
test.target)
|
||||
compilerOutputTests(test, given, expected, r)
|
||||
of actionRun, actionRunNoSpec:
|
||||
# In this branch of code "early return" pattern is clearer than deep
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue