-
Notifications
You must be signed in to change notification settings - Fork 697
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
Shallow and concurrent git clones #10254
Conversation
844e1bb
to
fd373ad
Compare
This change also affects |
fd373ad
to
eb4f43c
Compare
0416a52
to
85b2a5c
Compare
This is ready |
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.
Thanks!
85b2a5c
to
0d9629a
Compare
I've addressed your review @ulysses4ever. Merging this now! |
@alt-romes can you resolve the conflicts? |
Cloning the entire repository for the purpose of compiling packages specified in source-repository-packages is wasted effort. To read and compile the package, we need only the HEAD of the repository, thus a shallow clone is sufficient. Note that this doesn't change the behaviour of `cabal get -s` which still does a full clone (--depth=1 is only used in vcsSyncRepo, not in vcsCloneRepo) Fixes haskell#7264
Cloning/synchronising VCS repos can be unnecessarily slow if done serially. By synchronizing the repos concurrently we make much better use of time. Introduces rerunConcurrentlyIfChanged, a Rebuild monad function that runs, from multiple actions, the actions that need rebuilding concurrently.
0d9629a
to
c89ab54
Compare
Hi, I'm working on the VCS test suite and (while running it in verbose mode) I noticed this:
As a result, I'm not sure this feature is actually being tested. When I patched the test suite to use the
|
I have a number of PRs to make the VCS tests easier to work with open right now; I'll see if I can work on this when I get them merged:
|
Please read Github PR Conventions and then fill in one of these two templates.
Template Α: This PR modifies behaviour or interface
Include the following checklist in your PR:
Manual QA: Create or use a package with multiple source-repository-package dependencies,
cabal clean
, thencabal build
. You should see two repositories start being cloned at the same time, and then see other repositories being cloned concurrently as jobs are finished. The reason why only two repositories get cloned in parallel is that the limit of asynchronous downloads is == 2, to mimicasyncFetchPackages
.Questions: The maximum two-job cap on cloning concurrency seems too low, I think it would be best if it could be configured (as a follow up MR?)