-
Notifications
You must be signed in to change notification settings - Fork 848
extra-deps' clones as many times the repository as there are subdirs #5411
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
Comments
Thanks for reporting @blackheaven. Just a note: I've given this the |
Pantry caches repos but it looks like it does it per subdirectory - https://github.com/commercialhaskell/pantry/blob/master/src/Pantry/Storage.hs#L236 |
Nice catch. I am curious, what are the rationals for that strategy? |
@snoyberg could you share them? |
The model of pantry is that a tree represents a single package. This allows caching only what is needed for that package, and more frequent cache hits. IMO, the best way to improve this is to tweak pantry to aggregate all packages coming from the same repo and collect all the trees at once. I don't think it would be too invasive a change, and shouldn't require any changes at all to the overall model. |
It makes sense, thank you for that explanation. |
Another data point is cardano-wallet, which takes ~30 minutes just to clone all repos on my machine (1mb/s, say nothing 😢). Cabal takes about 5. |
Fix cloning per subdirectory wrt #5411
General summary/comments (optional)
When I specify, in extra-deps, a repository with many subdirs, the repository is clone many times.
Steps to reproduce
Build a project with this
package.yml
part:Expected
I expect only one cloning.
Actual
The repository is cloned once by subdir.
Partial output
Stack version
Method of installation
The text was updated successfully, but these errors were encountered: