Skip to content

Commit baa73a0

Browse files
committed
Test cabal-install with GHC-8.10
1 parent eef18eb commit baa73a0

File tree

16 files changed

+55
-48
lines changed

16 files changed

+55
-48
lines changed

.docker/validate-8.10.1.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,4 @@ RUN cabal v2-install -w ghc-8.10.1 --lib \
5757
# Validate
5858
WORKDIR /build
5959
COPY . /build
60-
RUN sh ./validate.sh --lib-only -w ghc-8.10.1 -v
60+
RUN sh ./validate.sh -w ghc-8.10.1 -v

.github/workflows/linux.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,21 @@ jobs:
4747
git fetch origin $GITHUB_REF:temporary-ci-branch
4848
git checkout $GITHUB_SHA || (git fetch && git checkout $GITHUB_SHA)
4949
- name: Validate print-config
50-
run: sh validate.sh -j 2 -w ghc-8.10.1 -v --lib-only -s print-config
50+
run: sh validate.sh -j 2 -w ghc-8.10.1 -v -s print-config
5151
- name: Validate print-tool-versions
52-
run: sh validate.sh -j 2 -w ghc-8.10.1 -v --lib-only -s print-tool-versions
52+
run: sh validate.sh -j 2 -w ghc-8.10.1 -v -s print-tool-versions
53+
- name: Validate make-cabal-install-dev
54+
run: sh validate.sh -j 2 -w ghc-8.10.1 -v -s make-cabal-install-dev
5355
- name: Validate build
54-
run: sh validate.sh -j 2 -w ghc-8.10.1 -v --lib-only -s build
56+
run: sh validate.sh -j 2 -w ghc-8.10.1 -v -s build
5557
- name: Validate lib-tests
56-
run: sh validate.sh -j 2 -w ghc-8.10.1 -v --lib-only -s lib-tests
58+
run: sh validate.sh -j 2 -w ghc-8.10.1 -v -s lib-tests
5759
- name: Validate lib-suite
58-
run: sh validate.sh -j 2 -w ghc-8.10.1 -v --lib-only -s lib-suite
60+
run: sh validate.sh -j 2 -w ghc-8.10.1 -v -s lib-suite
61+
- name: Validate cli-tests
62+
run: sh validate.sh -j 2 -w ghc-8.10.1 -v -s cli-tests
63+
- name: Validate cli-suite
64+
run: sh validate.sh -j 2 -w ghc-8.10.1 -v -s cli-suite
5965
validate-8_8_3:
6066
name: validate.sh ghc-8.8.3
6167
runs-on: ubuntu-18.04

cabal-dev-scripts/src/GenValidate.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ main = do
2121
-- this shouldn't fail (run-time errors are due bugs in zinza)
2222
w <- run Z
2323
{ zJobs =
24-
[ GhcJob "8.10.1" False "--lib-only" False ["8.8.3"] libSteps -- Note: only library atm.
24+
[ GhcJob "8.10.1" False "" False ["8.8.3"] defSteps
2525
, GhcJob "8.8.3" False "--solver-benchmarks" False [] defSteps
2626
, GhcJob "8.6.5" False "--complete-hackage-tests" False ["8.8.3"] defSteps
2727
, GhcJob "8.4.4" False "" False ["8.8.3"] defSteps

cabal-install/Distribution/Client/FetchUtils.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,8 @@ fetchRepoTarball verbosity' repoCtxt repo pkgid = do
176176
verbosity = verboseUnmarkOutput verbosity'
177177

178178
downloadRepoPackage = case repo of
179-
RepoLocal{..} -> return (packageFile repo pkgid)
180-
RepoLocalNoIndex{..} -> return (packageFile repo pkgid)
179+
RepoLocal{} -> return (packageFile repo pkgid)
180+
RepoLocalNoIndex{} -> return (packageFile repo pkgid)
181181

182182
RepoRemote{..} -> do
183183
transport <- repoContextGetTransport repoCtxt

cabal-install/Distribution/Client/IndexUtils.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ withIndexEntries
665665
-> ([IndexCacheEntry] -> IO a)
666666
-> ([NoIndexCacheEntry] -> IO a)
667667
-> IO a
668-
withIndexEntries _ (RepoIndex repoCtxt repo@RepoSecure{..}) callback _ =
668+
withIndexEntries _ (RepoIndex repoCtxt repo@RepoSecure{}) callback _ =
669669
repoContextWithSecureRepo repoCtxt repo $ \repoSecure ->
670670
Sec.withIndex repoSecure $ \Sec.IndexCallbacks{..} -> do
671671
-- Incrementally (lazily) read all the entries in the tar file in order,

cabal-install/Distribution/Client/TargetSelector.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ readTargetSelectorsWith :: (Applicative m, Monad m) => DirActions m
222222
-> Maybe ComponentKindFilter
223223
-> [String]
224224
-> m (Either [TargetSelectorProblem] [TargetSelector])
225-
readTargetSelectorsWith dirActions@DirActions{..} pkgs mfilter targetStrs =
225+
readTargetSelectorsWith dirActions@DirActions{} pkgs mfilter targetStrs =
226226
case parseTargetStrings targetStrs of
227227
([], usertargets) -> do
228228
usertargets' <- mapM (getTargetStringFileStatus dirActions) usertargets

cabal-install/Distribution/Client/Update.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ updateRepo :: Verbosity -> UpdateFlags -> RepoContext -> Repo -> IO ()
7474
updateRepo verbosity updateFlags repoCtxt repo = do
7575
transport <- repoContextGetTransport repoCtxt
7676
case repo of
77-
RepoLocal{..} -> return ()
78-
RepoLocalNoIndex{..} -> return ()
77+
RepoLocal{} -> return ()
78+
RepoLocalNoIndex{} -> return ()
7979
RepoRemote{..} -> do
8080
downloadResult <- downloadIndex transport verbosity repoRemote repoLocalDir
8181
case downloadResult of

cabal-install/Distribution/Client/Utils/Json.hs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,9 @@ module Distribution.Client.Utils.Json
1515
)
1616
where
1717

18-
import Data.Char
19-
import Data.Int
20-
import Data.String
21-
import Data.Word
22-
import Data.List
23-
import Data.Monoid
18+
import Distribution.Client.Compat.Prelude
19+
20+
import Data.Char (intToDigit)
2421

2522
import Data.ByteString.Builder (Builder)
2623
import qualified Data.ByteString.Builder as BB
@@ -135,13 +132,13 @@ encodeArrayBB :: [Value] -> Builder
135132
encodeArrayBB [] = "[]"
136133
encodeArrayBB jvs = BB.char8 '[' <> go jvs <> BB.char8 ']'
137134
where
138-
go = Data.Monoid.mconcat . intersperse (BB.char8 ',') . map encodeValueBB
135+
go = mconcat . intersperse (BB.char8 ',') . map encodeValueBB
139136

140137
encodeObjectBB :: Object -> Builder
141138
encodeObjectBB [] = "{}"
142139
encodeObjectBB jvs = BB.char8 '{' <> go jvs <> BB.char8 '}'
143140
where
144-
go = Data.Monoid.mconcat . intersperse (BB.char8 ',') . map encPair
141+
go = mconcat . intersperse (BB.char8 ',') . map encPair
145142
encPair (l,x) = encodeStringBB l <> BB.char8 ':' <> encodeValueBB x
146143

147144
encodeStringBB :: String -> Builder

cabal-install/Distribution/Solver/Modular/Assignment.hs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ module Distribution.Solver.Modular.Assignment
99
import Prelude ()
1010
import Distribution.Solver.Compat.Prelude hiding (pi)
1111

12-
import Data.Array as A
13-
import Data.List as L
14-
import Data.Map as M
15-
import Data.Maybe
12+
import qualified Data.Array as A
13+
import qualified Data.List as L
14+
import qualified Data.Map as M
15+
16+
import Data.Maybe (fromJust)
1617

1718
import Distribution.PackageDescription (FlagAssignment, mkFlagAssignment) -- from Cabal
1819

@@ -79,7 +80,7 @@ toCPs (A pa fa sa) rdm =
7980
-- Dependencies per package.
8081
depp :: QPN -> [(Component, PI QPN)]
8182
depp qpn = let v :: Vertex
82-
v = fromJust (cvm qpn)
83+
v = fromJust (cvm qpn) -- TODO: why this is safe?
8384
dvs :: [(Component, Vertex)]
8485
dvs = tg A.! v
8586
in L.map (\ (comp, dv) -> case vm dv of (_, x, _) -> (comp, PI x (pa M.! x))) dvs

cabal-install/Distribution/Solver/Modular/Builder.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ module Distribution.Solver.Modular.Builder (
1919
-- flag-guarded dependencies, we cannot introduce them immediately. Instead, we
2020
-- store the entire dependency.
2121

22-
import Data.List as L
23-
import Data.Map as M
24-
import Data.Set as S
25-
import Prelude hiding (sequence, mapM)
22+
import qualified Data.List as L
23+
import qualified Data.Map as M
24+
import qualified Data.Set as S
25+
import Prelude
2626

2727
import qualified Distribution.Solver.Modular.ConflictSet as CS
2828
import Distribution.Solver.Modular.Dependency
@@ -55,7 +55,7 @@ data BuildState = BS {
5555
}
5656

5757
-- | Map of available linking targets.
58-
type LinkingState = Map (PN, I) [PackagePath]
58+
type LinkingState = M.Map (PN, I) [PackagePath]
5959

6060
-- | Extend the set of open goals with the new goals listed.
6161
--

cabal-install/Distribution/Solver/Modular/Index.hs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ module Distribution.Solver.Modular.Index
66
, mkIndex
77
) where
88

9-
import Data.List as L
10-
import Data.Map as M
119
import Prelude hiding (pi)
1210

11+
import Data.Map (Map)
12+
import qualified Data.List as L
13+
import qualified Data.Map as M
14+
1315
import Distribution.Solver.Modular.Dependency
1416
import Distribution.Solver.Modular.Flag
1517
import Distribution.Solver.Modular.Package

cabal-install/Distribution/Solver/Modular/IndexConversion.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ module Distribution.Solver.Modular.IndexConversion
22
( convPIs
33
) where
44

5-
import Data.List as L
5+
import qualified Data.List as L
66
import Data.Map.Strict (Map)
77
import qualified Data.Map.Strict as M
8-
import Data.Maybe
8+
import Data.Maybe (mapMaybe, fromMaybe, maybeToList)
99
import Data.Monoid as Mon
10-
import Data.Set as S
10+
import qualified Data.Set as S
1111

1212
import Distribution.Compiler
1313
import Distribution.InstalledPackageInfo as IPI
@@ -307,7 +307,7 @@ flagInfo (StrongFlags strfl) =
307307

308308
-- | Internal package names, which should not be interpreted as true
309309
-- dependencies.
310-
type IPNs = Set PN
310+
type IPNs = S.Set PN
311311

312312
-- | Convenience function to delete a 'Dependency' if it's
313313
-- for a 'PN' that isn't actually real.

cabal-install/Distribution/Solver/Modular/Solver.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ module Distribution.Solver.Modular.Solver
99
, PruneAfterFirstSuccess(..)
1010
) where
1111

12-
import Data.Map as M
13-
import Data.List as L
14-
import Data.Set as S
12+
import qualified Data.Map as M
13+
import qualified Data.List as L
14+
import qualified Data.Set as S
1515
import Distribution.Verbosity
1616

1717
import Distribution.Compiler (CompilerInfo)
@@ -91,8 +91,8 @@ solve :: SolverConfig -- ^ solver parameters
9191
-> Index -- ^ all available packages as an index
9292
-> PkgConfigDb -- ^ available pkg-config pkgs
9393
-> (PN -> PackagePreferences) -- ^ preferences
94-
-> Map PN [LabeledPackageConstraint] -- ^ global constraints
95-
-> Set PN -- ^ global goals
94+
-> M.Map PN [LabeledPackageConstraint] -- ^ global constraints
95+
-> S.Set PN -- ^ global goals
9696
-> RetryLog Message SolverFailure (Assignment, RevDepMap)
9797
solve sc cinfo idx pkgConfigDB userPrefs userConstraints userGoals =
9898
explorePhase $

cabal-install/Distribution/Solver/Modular/Validate.hs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@ module Distribution.Solver.Modular.Validate (validateTree) where
1515
import Control.Applicative
1616
import Control.Monad.Reader hiding (sequence)
1717
import Data.Function (on)
18-
import Data.List as L
19-
import Data.Set as S
2018
import Data.Traversable
2119
import Prelude hiding (sequence)
2220

21+
import qualified Data.List as L
22+
import qualified Data.Set as S
23+
2324
import Language.Haskell.Extension (Extension, Language)
2425

2526
import Data.Map.Strict as M

cabal-install/cabal-install.cabal

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ executable cabal
329329
build-depends:
330330
async >= 2.0 && < 2.3,
331331
array >= 0.4 && < 0.6,
332-
base >= 4.8 && < 4.14,
332+
base >= 4.8 && < 4.15,
333333
base16-bytestring >= 0.1.1 && < 0.2,
334334
binary >= 0.7.3 && < 0.9,
335335
bytestring >= 0.10.6.0 && < 0.11,
@@ -354,7 +354,7 @@ executable cabal
354354
time >= 1.5.0.1 && < 1.10,
355355
transformers >= 0.4.2.0 && < 0.6,
356356
zlib >= 0.5.3 && < 0.7,
357-
hackage-security >= 0.6.0.0 && < 0.7,
357+
hackage-security >= 0.6.0.1 && < 0.7,
358358
text >= 1.2.3 && < 1.3,
359359
parsec >= 3.1.13.0 && < 3.2
360360

cabal-install/cabal-install.cabal.pp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
build-depends:
1919
async >= 2.0 && < 2.3,
2020
array >= 0.4 && < 0.6,
21-
base >= 4.8 && < 4.14,
21+
base >= 4.8 && < 4.15,
2222
base16-bytestring >= 0.1.1 && < 0.2,
2323
binary >= 0.7.3 && < 0.9,
2424
bytestring >= 0.10.6.0 && < 0.11,
@@ -43,7 +43,7 @@
4343
time >= 1.5.0.1 && < 1.10,
4444
transformers >= 0.4.2.0 && < 0.6,
4545
zlib >= 0.5.3 && < 0.7,
46-
hackage-security >= 0.6.0.0 && < 0.7,
46+
hackage-security >= 0.6.0.1 && < 0.7,
4747
text >= 1.2.3 && < 1.3,
4848
parsec >= 3.1.13.0 && < 3.2
4949

0 commit comments

Comments
 (0)