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

Cannot import modules in .nimble during nimble install #1259

Open
madonuko opened this issue Aug 14, 2024 · 6 comments
Open

Cannot import modules in .nimble during nimble install #1259

madonuko opened this issue Aug 14, 2024 · 6 comments

Comments

@madonuko
Copy link

nimble install nimsutils fails with the following error:

Downloading https://github.com/FyraLabs/nimsutils using git
   Warning: The package has no tagged releases, downloading HEAD instead.
  Verifying dependencies for [email protected]
 Installing [email protected]
       Tip: 3 messages have been suppressed, use --verbose to show them.
nimble.nim(399)          packageExists

    Error:  The package inside "/home/mado/.nimble/pkgs2/nimsutils-0.1.0-3d97d4dd06c39f7943ddb0b1dd28b05136077e63" is invalid.
  Details:  Could not read package info file in /home/mado/.nimble/pkgs2/nimsutils-0.1.0-3d97d4dd06c39f7943ddb0b1dd28b05136077e63/nimsutils.nimble;
        ...   Reading as ini file failed with: 
        ...     Invalid section: .
        ...   Evaluating as NimScript file failed with: 
        ...     /home/mado/.nimble/pkgs2/nimsutils-0.1.0-3d97d4dd06c39f7943ddb0b1dd28b05136077e63/nimsutils.nimble(1, 11) Error: cannot open file: src/nimsutils
        ... printPkgInfo() failed.

However, if you run nimble inside the repository directly, it works absolutely fine.

Since I can't find any docs saying you aren't allowed to import things in the .nimble file, I feel like this should be a bug from nimble install.

@xTrayambak
Copy link
Contributor

image

The Nimble manifest for that package seems to be completely invalid. Running nimble install on it with Nimble 0.16.2 results in an error in both the cases.

@ringabout This is not reproducible.

@madonuko
Copy link
Author

madonuko commented Dec 4, 2024

Have you tried running nimble tasks?

@xTrayambak
Copy link
Contributor

image
It does seem to parse it with no issues, but it cannot evaluate it.

@madonuko
Copy link
Author

madonuko commented Dec 4, 2024

If it can parse it, and if running nimble mytask even works, then I mean… supposedly it can evaluate it?

@xTrayambak
Copy link
Contributor

No, I mean "interpretation" when I say "evaluation". It cannot execute that.

@madonuko
Copy link
Author

madonuko commented Dec 5, 2024

Sorry for my ignorance, but there a particular reason why nimble install can't import the file but in other situations you can?
The xtask thing clearly works (nimble mytask runs fine, nimble tasks can find it too, etc), I feel like the import system is broken particularly in nimble install only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants