nimble
nimble copied to clipboard
Command to retrieve path to .nimble file
/cc @dom96
all other packages foo I installed after nimble develop behaved like:
nimble path foo returns /Users/timothee/git_clone/nim/foo
but not nimble:
nimble path nimble returns /Users/timothee/git_clone/nim/nimble/src instead of /Users/timothee/git_clone/nim/nimble
AFAIK nimble path returns the path to the source code, which seems correct for what you got.
ok i see; looks like every package I tried have nimble path pointing to dir where the nimble file is, not where the base of the import is, eg:
nimble path nimongo /pathto/nimongo
\ls /Users/timothee/git_clone/nim/nimongo LICENSE README.md nimongo nimongo.nimble tests
so maybe we need another command to get the dir that contains the nimble file; or, even better, the path to the nimble file itself: ie: nimble nimblepath nimble => would return: /pathto/nimble/nimble.nimble
from that, we can derive it's parent dir; but other way around is less trivial given corner cases, eg:
- https://github.com/micklat/NimBorg contains NimBorg.babel, not NimBorg.nimble
- aliases, eg: nimlibpng is Alias for png
What's the use of knowing where the nimble file is? What's the use case here?
at very least for debugging, to figure out which file was selected by nimble (eg in case there are multiple versions of the same packages); eg if you've installed X and then later nimble develop'd X in some local clone