Skip to content

new $nimbleDir path substitution yields unexpected search paths #12767

@disruptek

Description

@disruptek

Given the following nim.cfg in an otherwise empty directory:

--clearNimblePath
--path="$nimbledir/foo"

nim dump now yields

#...
/home/adavidoff/.nimble/pkgs/foo
/opt/nimble/pkgs/foo
#...

Because I don't actually have any nimblePaths (due to --clearNimblePath), I expected no substitution, ie:

#...
$nimbledir/foo
#...

I tried adding --noNimblePath:

--noNimblePath
--clearNimblePath
--path="$nimbledir/foo"

and the output did not change. Then I tried adding a --nimblePath:

--clearNimblePath
--nimblePath="$config/goats"
--path="$nimbledir/foo"

and now my search paths (not lazy paths) include the following:

/home/adavidoff/git/t/goats/foo
/home/adavidoff/.nimble/pkgs/foo
/opt/nimble/pkgs/foo

and lazy paths includes /home/adavidoff/git/t/goats.

So it seems that there are two breaking changes introduced in #12750:

  • we cannot remove these global paths at all
  • paths (below the target) that do not exist are added via --nimblePath

nimph will just add --excludePath to the nim.cfg to exclude missing paths, but I feel a better solution would be to fix the compiler.

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