Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression in distros.nim (foreignDep fails to compile) #10024

andreaferretti opened this issue Dec 17, 2018 · 1 comment


None yet
1 participant
Copy link

commented Dec 17, 2018

Running nimble test on neo fails with

 Error: Could not read package info file in /Users/andrea/progetti/neo/neo.nimble;
        ...   Reading as ini file failed with: 
        ...     Invalid section: .
        ...   Evaluating as NimScript file failed with: 
        ...     /Users/andrea/.mynim/devel/lib/pure/distros.nim(191, 5) Error: undeclared identifier: 'nimscriptapi'.

Apparently the culprit is the following block in neo.nimble:

when defined(nimdistros):
  import distros
  if detectOs(Ubuntu) or detectOs(Debian):
    foreignDep "libblas-dev"
    foreignDep "libopenblas-dev"
    foreignDep "liblapack-dev"
    foreignDep "libblas"
    foreignDep "liblapack"

which in turn triggers the failure at this line

@andreaferretti andreaferretti changed the title Regression in distros.nim Regression in distros.nim (foreignDep fails to compile) Dec 19, 2018


This comment has been minimized.

Copy link
Collaborator Author

commented Dec 21, 2018

By the way, the easiest way to reproduce is to use any nimble file which contains

when defined(nimdistros):
  import distros

  foreignDep "foo"

It seems this only affects nimble, because of this line

when defined(nimble):

Now, according to git blame, these lines have been there since nimscripts exists, more or less. I am not sure what is going on, but it seems that foreignDep at the moment is completely unusable for me. Can anyone else confirm?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.