-
Notifications
You must be signed in to change notification settings - Fork 841
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Git repositories with submodules #4581
Add support for Git repositories with submodules #4581
Conversation
e95ff8a
to
0c49c9e
Compare
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
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall it looks good but we need a passing integration test
767a952
to
f556c95
Compare
@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.
f556c95
to
b24fa32
Compare
@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 setup
a package that has an "extra-deps" on a package contained in a sub-submodule of a Git repo.Also export the function
withRepo
that I use to implement #4567.