You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following issue happens with Version 1.1.0, Git revision 752100285335b2f18a3fec0039bd0581e8c25468 (3546 commits) x86_64 hpack-0.13.0 using Git 2.8.1.
When trying to build Lamdu which has a stack.yaml having a Git dependency over another package that has a submodule, I got the following:
-- While building package bindings-freetype-gl-0.1.0.0 using:
/home/dan/dev/gh/da-x/lamdu/.stack-work/downloaded/22e1318b53013f3cd452538c0584632668207c3d460c75655f8c68a588e92f4b/.stack-work/dist/x86_64-linux/Cabal-1.22.5.0/setup/setup --builddir=.stack-work/dist/x86_64-linux/Cabal-1.22.5.0 build lib:bindings-freetype-gl --ghc-options " -ddump-hi -ddump-to-file"
Process exited with code: ExitFailure 1
Logs have been written to: /home/dan/dev/gh/da-x/lamdu/.stack-work/logs/bindings-freetype-gl-0.1.0.0.log
Configuring bindings-freetype-gl-0.1.0.0...
fatal: Not a git repository: /home/dan/dev/gh/da-x/lamdu/.stack-work/downloaded/22e1318b53013f3cd452538c0584632668207c3d460c75655f8c68a588e92f4b.tmp/.git/modules/freetype-gl
Unable to find current revision in submodule path 'freetype-gl'
Looking into this, I've discovered that Stack clones the Git repo to the path of 22e1318b53013f3cd452538c0584632668207c3d460c75655f8c68a588e92f4b.tmp, and then moves it to 22e1318b53013f3cd452538c0584632668207c3d460c75655f8c68a588e92f4b, i.e. removing the .tmp. However, the problem is that under the clone, the .git files pointing to the submodule repo contain absolute paths - the ones that existed used when the repo was originally cloned - with the .tmp name.
I fixed it manually by finding the submodules. The following lists both the clones and their submodules:
So I edited the 3 submodules shown above, and got around it temporarily.
I guess that the fix would be to mind the submodules somehow. Maybe not move the clone, or by fixing the paths in the .git files after moving them? Or, perhaps consulting with the authors of Git in order to figure out how to freely move Git clones around. I wonder why they decided to use absolute paths? Maybe there's a way to run the clone command in a way that does not generate these absolute paths.
The following issue happens with
Version 1.1.0, Git revision 752100285335b2f18a3fec0039bd0581e8c25468 (3546 commits) x86_64 hpack-0.13.0
using Git 2.8.1.When trying to build Lamdu which has a
stack.yaml
having a Git dependency over another package that has a submodule, I got the following:Looking into this, I've discovered that Stack clones the Git repo to the path of
22e1318b53013f3cd452538c0584632668207c3d460c75655f8c68a588e92f4b.tmp
, and then moves it to22e1318b53013f3cd452538c0584632668207c3d460c75655f8c68a588e92f4b
, i.e. removing the.tmp
. However, the problem is that under the clone, the.git
files pointing to the submodule repo contain absolute paths - the ones that existed used when the repo was originally cloned - with the.tmp
name.I fixed it manually by finding the submodules. The following lists both the clones and their submodules:
The problem is here:
So I edited the 3 submodules shown above, and got around it temporarily.
I guess that the fix would be to mind the submodules somehow. Maybe not move the clone, or by fixing the paths in the
.git
files after moving them? Or, perhaps consulting with the authors of Git in order to figure out how to freely move Git clones around. I wonder why they decided to use absolute paths? Maybe there's a way to run the clone command in a way that does not generate these absolute paths.Just trying it outside of Stack:
Looks like it's default behavior for now :(. Saw nothing in the man page for it. Can dig into the Git repo of Git but I have other things to do.
The text was updated successfully, but these errors were encountered: