Skip to content

Commit

Permalink
synchronize source repos concurrently
Browse files Browse the repository at this point in the history
  • Loading branch information
edmundnoble committed Apr 7, 2024
1 parent 5a36067 commit 40cd496
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cabal-install/src/Distribution/Client/ProjectConfig.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1338,12 +1338,13 @@ syncAndReadSourcePackagesRemoteRepos
]

let progPathExtra = fromNubList projectConfigProgPathExtra
let numJobs = 4 -- hardcoded for now
getConfiguredVCS <- delayInitSharedResources $ \repoType ->
let vcs = Map.findWithDefault (error $ "Unknown VCS: " ++ prettyShow repoType) repoType knownVCSs
in configureVCS verbosity progPathExtra vcs

concat
<$> sequenceA
<$> sequenceConcurrentlyBoundedRebuild numJobs
[ rerunIfChanged verbosity monitor repoGroup' $ do
vcs' <- getConfiguredVCS repoType
syncRepoGroupAndReadSourcePackages vcs' pathStem repoGroup'
Expand Down
5 changes: 5 additions & 0 deletions changelog.d/synchronize-source-repos-concurrently
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
synopsis: Synchronize source repositories concurrently
packages: cabal-install
prs: #0000
significance: significant

0 comments on commit 40cd496

Please sign in to comment.