I am trying to write a project that depends on my own project linalg at version 0.1.2.
I have put the obvious dependency in Nimble Requires: "nim >= 0.11.2,linalg >= 0.1.2". Here is the repository on Github. Everything seems fine, but nimble fails with
FAILURE: Downloaded package's version does not satisfy requested version range: wanted >= 0.1.2 got 0.1.1.
I cannot see anything wrong - what can I do?
git clone https://github.com/unicredit/linear-algebra.git
git checkout 0.1.2
If so, the tag itself specifies a precise commit in the history, hence there is no need to find out what branch to use (in fact, the commit may not even be on a named branch, or it may be in the past history of multiple branches).
But again, I am not sure what Nimble does exactly to checkout a version
Please, do not take these comments negatively. I think nimble is a great tool, but I think that a lot can be done, in terms of documentation, to streamline the common tasks (build an executable, run tests, depend on libraries, pass options to nim)
1,2. I agree - https://github.com/nim-lang/nimble/issues/132
- nimble build will produce the executable for you, nimble install will produce the executable and install it.
- That is the current way I would do it. My projects have a nim.cfg file with a --path:../src option in it, so that my tests use the library in the parent dir, not the Nimble-installed one. If you have suggestions on how to make it better then do tell.
- .nimble has no relation to nim.cfg files. Nimble reads the former, Nim compiler reads the latter. They don't interact.
I agree that a lot can be done. I've got lots of issues in Nimble's issue tracker, please take a look at them. If you have ideas on how to fix/improve anything then please make issues on Nimble's issue tracker.