nim-lang / nimble

Package manager for the Nim programming language.
https://nim-lang.github.io/nimble/index.html
Other
1.25k stars 191 forks source link

Nimscript errors aren't shown #619

Closed dom96 closed 5 years ago

dom96 commented 5 years ago

I've just realised that nimscript errors are hidden behind the --verbose flag:

~/.nimble/pkgs/nimble-0.9.0 » ~/projects/nimble/src/nimble check --verbose                                                             1 ↵
    Reading config file at /Users/dom/.config/nimble/nimble.ini
NimCompilerApiVersion @[]
    Setting Nim stdlib prefix to /Users/dom/projects/nim
    Setting Nim stdlib path to /Users/dom/projects/nim/lib
       Info Hint: used config file '/Users/dom/projects/nim/config/nim.cfg' [Conf]
       Info /Users/dom/projects/nim/lib/core/macros.nim(719, 15) Error: undeclared identifier: 'float128'
       Info /Users/dom/projects/nim/lib/core/macros.nim(1070, 49) template/generic instantiation of `$` from here
       Info /Users/dom/projects/nim/lib/system/dollars.nim(126, 21) template/generic instantiation of `collectionToString` from here
       Info /Users/dom/projects/nim/lib/system/dollars.nim(110, 67) Error: type mismatch
     Error: nimble.nim(1123)         nimble
        ... nimble.nim(1096)         doAction
        ... nimble.nim(1036)         check
        ... common.nim(51)           raiseNimbleError
        ... Could not validate package:
        ... Could not read package info file in /Users/dom/.nimble/pkgs/nimble-0.9.0/nimble.nimble;
        ...   Reading as ini file failed with: 
        ...     Invalid section: .
        ...   Evaluating as NimScript file failed with: 
        ...     /Users/dom/.nimble/pkgs/nimble-0.9.0/nimble.nimble(33, 1) Error: undeclared identifier: 'task'.

They should be shown as an error when "error" is in the message.

dom96 commented 5 years ago

Btw compiles seems to fail in the current VM (CC @Araq)

genotrance commented 5 years ago

I'm not sure if this is still applicable with the nocompiler implementation.

dom96 commented 5 years ago

It could be, do such error messages get output by Nimble now?

genotrance commented 5 years ago

We run nim e either collecting its output for package info or letting it go straight to stdout so in either case, the output is printed for errors.

genotrance commented 5 years ago

I just verified - we can close this.