Created
April 11, 2015 18:30
-
-
Save gmpreussner/df7705a7c2c3c57f0e62 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
framework | |
packageA | |
bin | |
docs | |
src | |
module1.nim | |
module2.nim | |
module3.nim | |
tests | |
tmodule1.nim | |
tmodule2.nim | |
tmodule3.nim | |
all.nim | |
packageB | |
bin | |
docs | |
src | |
module4.nim ## requires module1 | |
module5.nim ## requires module3 | |
module6.nim | |
tests | |
tmodule4.nim | |
tmodule5.nim | |
tmodule6.nim | |
all.nim | |
packageC | |
bin | |
docs | |
src | |
module7.nim ## requires module2, module6 | |
module8.nim ## requires module1, module5 | |
module9.nim | |
tests | |
tmodule7.nim | |
tmodule8.nim | |
tmodule9.nim | |
all.nim | |
programs | |
programA | |
src | |
module10.nim ## requires module1, module4, module7 | |
programB | |
src | |
module11.nim ## requires module2 | |
programC | |
src | |
module12.nim ## requires module5, module8 |
import packageName/module
This I cannot get to work. I can do "import module", and it happens to find the right one (by accident?), but I cannot qualify the import with a package name, at least not in conjunction with --NimblePath: "Error cannot open 'packageName/module'"
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That's something the, still planned,
nimble c file.nim
feature should be able to handle.That's a job for
nimble build
.Your list of requirements is unfortunately rather big so I don't think Nimble can satisfy all of them.
Here is an outline of how the current work-flow would work, and yes, I know it's not ideal:
.nimble
file.nimble install
in their directories, this would need to be repeated each time a change is made to these packages (I know, not ideal)..nimble
file also in which you can specify the dependencies on the required packages in your framework.nimble build
.Alternatively you can create a
nim.cfg
file in each of your programs directories with a--path:<p>
directive, where<p>
is a PATH to your packages. This means you won't need to constantly reinstall the packages when they are changed, but this will not work when the paths change.Your package modules are already in their own
packageName
dirs (packageA, packageB, etc...). What you should do is import the package's module like so: import packageName/module.