Skip to content

--hints:off doesn't work (doesn't override ~/.config/nim.cfg) #8312

Closed
@timotheecour

Description

@timotheecour

~/.config/nim.cfg:
hint[source]=on

test.nim:
1+1

 nim compile --run --verbosity=0 --hints=off '--hint[source]=off' --path=./ /tmp/z01.nim
/private/tmp/z01.nim(1, 2) Error: expression '2' is of type 'int literal(2)' and has to be discarded

nim compile --run --verbosity=0 --hints=off --path=./ /tmp/z01.nim
/private/tmp/z01.nim(1, 2) Error: expression '2' is of type 'int literal(2)' and has to be discarded
  1+1
   ^

--hints:off is supposed to turn all hints off (from docs); however as shown above, --hints=off '--hint[source]=off' was needed to undo the effect of ~/.config/nim.cfg

perhaps what's going on is that currently, --hints=off is applied BEFORE reading ~/.config/nim.cfg (instead of after) ?

NOTE: this seems to be the root cause of inim-repl/INim#16

( I had hint[source]=on in my ~/.config/nim.cfg, and --hints=off should've cancelled that hint, but didn't)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions