-
Notifications
You must be signed in to change notification settings - Fork 846
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Pass --depth 1 to git #4345
Comments
It seems that we are already doing this? Line 203 in 7574e33
|
@mihaimaruseac That is the invocation for stack upgrading from its own source repo. I believe that @domenkozar is referring to the invocations for fetching dependencies from git. IIRC the reason depth wasn't set to 1 was in order to have sharing of git objects when updating the git dependencies - I believe at some point it would try to reuse the existing repo instead of recloning. Looks like now it simply reclones each time, though, so indeed stack/src/Stack/PackageLocation.hs Line 229 in 2c8cdfb
|
Makes sense then. i'll do a PR asap in that case. |
Oh, but that file has been dropped from master |
If I understand stack/subs/pantry/src/Pantry/Types.hs Lines 1318 to 1331 in 7574e33
Guess I'll just have to trace it when I get some more free time and see how it behaves. |
That is using the tarball without git, which is a good alternative. But using git could have a similar performance, if |
With the new way we do things with Pantry (checking out the repo and caching it in the SQLite store), skipping the history clone would be great. The relevant code for doing the cloning is here: stack/subs/pantry/src/Pantry/Repo.hs Lines 74 to 99 in dbe1572
The problem is that, to my recollection, some older versions of Git do not support cloning at a specific commit. Therefore, cloning at depth 1 would prevent us from then resetting to the commit we want. |
I see, it cloning revision even requires special feature on the server: https://stackoverflow.com/questions/31278902/how-to-shallow-clone-a-specific-commit-with-depth-1 I guess the only thing that can be done then is to make depth an option, so user can hand-pick it. |
Yes, a server feature, though we can pick sensible defaults? |
How about a setting in the |
Moved to wishlist https://github.com/commercialhaskell/stack/wiki/Wishlist |
Some git repositories can be really big (i.e. amazonka), does stack need anything else from the git history besides the latest revision? This would save bandwidth and time fetching git dependencies.
The text was updated successfully, but these errors were encountered: