Shallow and concurrent git clones#10254
Merged
mergify[bot] merged 2 commits intoNov 17, 2024
Merged
Conversation
844e1bb to
fd373ad
Compare
Collaborator
|
This change also affects |
fd373ad to
eb4f43c
Compare
0416a52 to
85b2a5c
Compare
Collaborator
Author
|
This is ready |
geekosaur
approved these changes
Nov 9, 2024
ulysses4ever
approved these changes
Nov 10, 2024
85b2a5c to
0d9629a
Compare
Collaborator
Author
|
I've addressed your review @ulysses4ever. Merging this now! |
Collaborator
|
@alt-romes can you resolve the conflicts? |
5 tasks
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
Collaborator
|
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 |
2 tasks
Collaborator
|
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:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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?)