nimble
nimble copied to clipboard
nimble install doesn't clone git submodules
Probably you'll want to enable Git submodule cloning by default (--recurse-submodules
option). Seems like a sensible default to me and I see no reason why Nimble should not clone submodules if the package developer decided to use them. The lack of submodule cloning currently breaks xxhash.nim
, for example.
https://github.com/OpenSystemsLab/xxhash.nim
Thought we already do this, there is a bunch of commands we have that appear to do this: https://github.com/nim-lang/nimble/blob/master/src/nimblepkg/download.nim#L28
@dom96 Well, try installing that module I mentioned and see what happens. It does not currently clone the submodule inside the private
directory.
That link you sent is for update though, no? This seems to be the actual clone (install) command I think:
https://github.com/nim-lang/nimble/blob/16ba5db44e0a9132f966a2082012cc3520bfec06/src/nimblepkg/download.nim#L53
I'm not exactly a git expert and I know little about submodules, but using git clone --recurse-submodules
did the trick for me to clone the repo manually so I could actually use the module.
The submodule does get checked out in temp but does not get copied into ~/.nimble/pkgs
. Looks like a workaround would be to use installDirs
.
Should nimble be smart enough to copy submodules automatically? Will require it to parse the .gitmodules file.
Why doesn't it get installed? The submodule is in the "srcDir" (since the srcDir
is .
in that package's case) so no reason Nimble should ignore it if it exists.
Unclear, probably after the code change a couple years ago where files are scanned before the before
hook so any files generated after that get skipped. This broke nimgen.
Might be same root cause here but speculation.