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

Incorrect path setup in nim.cfg for package installation #13

Open
titanomachy opened this issue Sep 21, 2024 · 3 comments
Open

Incorrect path setup in nim.cfg for package installation #13

titanomachy opened this issue Sep 21, 2024 · 3 comments

Comments

@titanomachy
Copy link

I encountered an issue while trying to import the uuids package in my project. I installed the package with atlas use uuids. When compiling, Nim throws the following error:

Error: cannot open file: uuids

Upon inspecting the nim.cfg file, I noticed that the package path was added as:

--path:"uuids"

However, this seems incorrect because the source files for the package reside in the src directory within the uuids package folder. Manually updating the path to include /src resolves the issue:

--path:"uuids/src"

Steps to Reproduce:

  1. Install the uuids package via Nimble using nimble install uuids.
  2. Try to import the package using import uuids.
  3. Compile the project, which results in the error: cannot open file: uuids.

Expected Behavior:

Nim should be able to find and import the uuids package correctly without requiring manual changes to nim.cfg.

Actual Behavior:

The path added to nim.cfg does not include the /src directory, leading to the cannot open file error during compilation.

Environment:

  • Nim Version: 2.0.8
  • Package Version: 0.1.0
  • Atlas Version: 0.8.0
  • Operating System: Arch Linux

Suggested Fix:

Update the installation or package configuration to automatically point to the src directory inside the package folder. Alternatively, the nimble configuration could be adjusted so that users don't need to manually update paths.

Thanks for maintaining this package! Please let me know if you need more information or if there's another workaround.

@titanomachy
Copy link
Author

titanomachy commented Sep 21, 2024

Maybe an issue with Atlas, but other packages were installed correctly with a --path: "<package>/src" in nim.cfg

@ThomasTJdev
Copy link

Just to pitch in:
Using nimble or nimbledeps everything works fine.

I would raise this issue in the atlas repo.

@titanomachy
Copy link
Author

I'll try to dig a little deeper into the issue and where it stems from when I have the time. Not sure why exactly Atlas is not adding the /src path for the UUID package, but does for other packages. If Nimble does add it, than it would probably easy to pinpoint and to fix. I think they are working on some changes right now. Also had some issues with the --deps parameter not working correctly in Atlas, but I will wait for a new release and test it again.

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

No branches or pull requests

2 participants