File tree Expand file tree Collapse file tree 8 files changed +21
-14
lines changed Expand file tree Collapse file tree 8 files changed +21
-14
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ Major changes:
11
11
12
12
Behavior changes:
13
13
14
+ * cloning git repositories isn't per sub-directory anymore, see [ #5411 ] ( https://github.com/commercialhaskell/stack/issues/5411 )
15
+
14
16
Other enhancements:
15
17
16
18
* ` stack setup ` supports installing GHC for macOS aarch64 (M1)
Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ dependencies:
92
92
- network-uri
93
93
- open-browser
94
94
- optparse-applicative >= 0.14.3.0
95
- - pantry >= 0.5.2
95
+ - pantry >= 0.5.3
96
96
- casa-client
97
97
- casa-types
98
98
- path
Original file line number Diff line number Diff line change 6
6
{-# LANGUAGE OverloadedStrings #-}
7
7
{-# LANGUAGE RecordWildCards #-}
8
8
{-# LANGUAGE TypeFamilies #-}
9
+ {-# LANGUAGE LambdaCase #-}
9
10
10
11
-- | The general Stack configuration that starts everything off. This should
11
12
-- be smart to falback if there is no stack.yaml, instead relying on
@@ -652,6 +653,14 @@ fillProjectWanted stackYamlFP config project locCache snapCompiler snapPackages
652
653
pp <- mkProjectPackage YesPrintWarnings resolved (boptsHaddock bopts)
653
654
pure (cpName $ ppCommon pp, pp)
654
655
656
+ -- prefetch git repos to avoid cloning per subdirectory
657
+ -- see https://github.com/commercialhaskell/stack/issues/5411
658
+ let gitRepos = mapMaybe (\ case
659
+ (RPLImmutable (RPLIRepo repo rpm)) -> Just (repo, rpm)
660
+ _ -> Nothing ) (projectDependencies project)
661
+ logDebug (" Prefetching git repos: " <> display (T. pack (show gitRepos)))
662
+ fetchReposRaw gitRepos
663
+
655
664
(deps0, mcompleted) <- fmap unzip . forM (projectDependencies project) $ \ rpl -> do
656
665
(pl, mCompleted) <- case rpl of
657
666
RPLImmutable rpli -> do
Original file line number Diff line number Diff line change @@ -836,15 +836,8 @@ buildGhcFromSource getSetupInfo' installed (CompilerRepository url) commitId fla
836
836
if compilerTool `elem` installed
837
837
then return (compilerTool,CompilerBuildStandard )
838
838
else do
839
- let repo = Repo
840
- { repoCommit = commitId
841
- , repoUrl = url
842
- , repoType = RepoGit
843
- , repoSubdir = mempty
844
- }
845
-
846
839
-- clone the repository and execute the given commands
847
- Pantry. withRepo repo $ do
840
+ Pantry. withRepo ( Pantry. SimpleRepo url commitId RepoGit ) $ do
848
841
-- withRepo is guaranteed to set workingDirL, so let's get it
849
842
mcwd <- traverse parseAbsDir =<< view workingDirL
850
843
let cwd = fromMaybe (error " Invalid working directory" ) mcwd
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ extra-deps:
32
32
- casa-types-0.0.1@rev:0
33
33
- rio-0.1.21.0@rev:0
34
34
- rio-prettyprint-0.1.1.0@rev:0
35
+ - pantry-0.5.3@rev:0
35
36
36
37
drop-packages :
37
38
# See https://github.com/commercialhaskell/stack/pull/4712
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ ghc-options:
20
20
" $locals " : -fhide-source-paths
21
21
22
22
extra-deps :
23
- - pantry-0.5.2 @rev:0
23
+ - pantry-0.5.3 @rev:0
24
24
- rio-0.1.21.0@rev:0
25
25
26
26
drop-packages :
Original file line number Diff line number Diff line change @@ -272,7 +272,7 @@ library
272
272
, network-uri
273
273
, open-browser
274
274
, optparse-applicative >= 0.14.3.0
275
- , pantry >= 0.5.2
275
+ , pantry >= 0.5.3
276
276
, path
277
277
, path-io
278
278
, persistent
@@ -395,7 +395,7 @@ executable stack
395
395
, network-uri
396
396
, open-browser
397
397
, optparse-applicative >= 0.14.3.0
398
- , pantry >= 0.5.2
398
+ , pantry >= 0.5.3
399
399
, path
400
400
, path-io
401
401
, persistent
@@ -517,7 +517,7 @@ executable stack-integration-test
517
517
, open-browser
518
518
, optparse-applicative >= 0.14.3.0
519
519
, optparse-generic
520
- , pantry >= 0.5.2
520
+ , pantry >= 0.5.3
521
521
, path
522
522
, path-io
523
523
, persistent
@@ -644,7 +644,7 @@ test-suite stack-test
644
644
, network-uri
645
645
, open-browser
646
646
, optparse-applicative >= 0.14.3.0
647
- , pantry >= 0.5.2
647
+ , pantry >= 0.5.3
648
648
, path
649
649
, path-io
650
650
, persistent
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ packages:
5
5
6
6
extra-deps :
7
7
- rio-0.1.21.0@rev:0
8
+ - pantry-0.5.3@rev:0
9
+
8
10
9
11
docker :
10
12
enable : false
You can’t perform that action at this time.
0 commit comments