Add support for Git repositories with submodules#4581
Add support for Git repositories with submodules#4581dbaynard merged 1 commit intocommercialhaskell:masterfrom hsyl20:hsyl20-git-submodules
Conversation
|
Hi @hsyl20, Thanks for the PR. I misread 'submodules' as 'subdirectories' the first time. Am I correct to say: currently pantry doesn't support git submodules; this change introduces that support? If not, please correct me. Also, would you please give a brief description of how your change handles recursive submodules. There are a few issues at the moment concerning pantry and git (#4579, #4580) so I suggest @qrilka take a look at this PR at the same time as them. Thanks! |
|
Hi @dbaynard,
Yes exactly. Pantry uses
I use
|
qrilka
left a comment
There was a problem hiding this comment.
Overall it looks good but we need a passing integration test
|
@hsyl20 it still fails for me, now with a different error: |
`git archive` doesn't include files from git submodules in the generated archive. This patch uses `git submodule foreach` to explicitly generate an archive for each submodule and to append it to the main one with `tar` command. We also export `withRepo` which can be useful independently of repo archive creation.
|
@qrilka I have pushed a new version of the test that doesn't use a relative path ("..") in the git repo path. I am not sure it fixes the issue you get though. Could it be that you don't have the "tar" program in your PATH? Can you show the verbose output of stack? |
|
@hsyl20 it looks like I just forgot to rebuild local Stack executable before running the test. Probably we need to have some way to do that automatically but that's outside of this PR for sure :) |
Add support for Git submodules (recursive or not) in Pantry. Useful when a git repository containing submodules is used as a Stack "extra-deps".
A test has been added: it tries to
stack setupa package that has an "extra-deps" on a package contained in a sub-submodule of a Git repo.Also export the function
withRepothat I use to implement #4567.