uuids icon indicating copy to clipboard operation
uuids copied to clipboard

Incorrect path setup in `nim.cfg` for package installation

Open titanomachy opened this issue 5 months ago • 2 comments

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 avatar Sep 21 '24 22:09 titanomachy