nim-works / nimskull

An in development statically typed systems programming language; with sustainability at its core. We, the community of users, maintain it.

Home Page:https://nim-works.github.io/nimskull/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error in nim.cfg does not make the compiler quit with an error code

alaviss opened this issue · comments

Example

Use this test.nim.cfg with an empty test.nim:

--gibberish

Actual Output

$ nim c test.nim || echo got error
test.nim.cfg(1, 3) Error: Invalid command line option - gibberish

Expected Output

$ nim c test.nim || echo got error
test.nim.cfg(1, 3) Error: Invalid command line option - gibberish
got error

Possible Solution

  • Write error handling code for this case:

    nimskull/compiler/nim.nim

    Lines 159 to 161 in 7e7226f

    of cliErrConfigProcessing, cliErrCommandProcessing, cliFinished:
    # TODO: more specific handling here
    discard "error messages reported internally"

Resolved by #1119, but was not closed automatically.