Skip to content

Commit ed340b7

Browse files
committed
Support GHC 8.6.1 nightlies, and add stack-lts-12.yaml
1 parent 0b48cb2 commit ed340b7

8 files changed

Lines changed: 78 additions & 15 deletions

File tree

.travis.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,14 @@ matrix:
2929
compiler: ": #stack 8.2.2"
3030
addons: {apt: {packages: [ghc-8.2.2, alex-3.1.7, happy-1.19.5], sources: [hvr-ghc]}}
3131

32-
- env: BUILD=stack GHCVER=8.4.3 STACK_YAML=stack-nightly.yaml
32+
- env: BUILD=stack GHCVER=8.4.3 STACK_YAML=stack-lts-12.yaml
3333
compiler: ": #stack 8.4.3"
3434
addons: {apt: {packages: [ghc-8.4.3, alex-3.1.7, happy-1.19.5], sources: [hvr-ghc]}}
3535

36+
- env: BUILD=stack GHCVER=8.6.1 STACK_YAML=stack-nightly.yaml
37+
compiler: ": #stack 8.6.1"
38+
addons: {apt: {packages: [ghc-8.6.1, alex-3.1.7, happy-1.19.5], sources: [hvr-ghc]}}
39+
3640
- env: BUILD=stack GHCVER=8.2.2 STACK_YAML=stack.yaml
3741
compiler: ": #stack 8.2.2 osx"
3842
os: osx

src/Stack/Fetch.hs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -377,9 +377,13 @@ lookupPackageIdentifierExact
377377
-> RIO env (Maybe ByteString)
378378
lookupPackageIdentifierExact identRev cache = do
379379
cl <- view cabalLoaderL
380-
forM (lookupResolvedPackage cl identRev cache) $ \rp -> do
381-
[bs] <- withCabalFiles (indexName (rpIndex rp)) [(rp, ())] $ \_ _ bs -> return bs
382-
return bs
380+
case lookupResolvedPackage cl identRev cache of
381+
Nothing -> return Nothing
382+
Just rp -> do
383+
bss <- withCabalFiles (indexName (rpIndex rp)) [(rp, ())] $ \_ _ bs -> return bs
384+
case bss of
385+
[bs] -> return (Just bs)
386+
_ -> return Nothing
383387

384388
data FuzzyResults
385389
= FRNameNotFound !(Maybe (NonEmpty T.Text))

src/Stack/PackageIndex.hs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,9 @@ getPackageCaches = do
405405
result <- liftM mconcat $ forM (clIndices cl) $ \index -> do
406406
fp <- configPackageIndexCache (indexName index)
407407
PackageCache pis <-
408-
#if MIN_VERSION_template_haskell(2,13,0)
408+
#if MIN_VERSION_template_haskell(2,14,0)
409+
$(versionedDecodeOrLoad (storeVersionConfig "pkg-v5" "35_zXZ4b4CIWfrLXtjWteR4nb6o="
410+
#elif MIN_VERSION_template_haskell(2,13,0)
409411
$(versionedDecodeOrLoad (storeVersionConfig "pkg-v5" "LLL6OCcimOqRm3r0JmsSlLHcaLE="
410412
#else
411413
$(versionedDecodeOrLoad (storeVersionConfig "pkg-v5" "A607WaDwhg5VVvZTxNgU9g52DO8="

src/Stack/Types/Build.hs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{-# LANGUAGE NoImplicitPrelude #-}
2+
{-# LANGUAGE CPP #-}
23
{-# LANGUAGE DataKinds #-}
34
{-# LANGUAGE DeriveDataTypeable #-}
45
{-# LANGUAGE DeriveGeneric #-}
@@ -686,4 +687,8 @@ instance Store PrecompiledCache
686687
instance NFData PrecompiledCache
687688

688689
precompiledCacheVC :: VersionConfig PrecompiledCache
690+
#if MIN_VERSION_template_haskell(2,14,0)
691+
precompiledCacheVC = storeVersionConfig "precompiled-v2" "1Q08F5_iKDGDMPCuBG0-Av9nEKk="
692+
#else
689693
precompiledCacheVC = storeVersionConfig "precompiled-v2" "55vMMtbIlS4UukKnSmjs1SrI01o="
694+
#endif

src/Stack/Types/BuildPlan.hs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
{-# LANGUAGE NoImplicitPrelude #-}
1+
{-# LANGUAGE NoImplicitPrelude #-}
2+
{-# LANGUAGE CPP #-}
23
{-# LANGUAGE DataKinds #-}
34
{-# LANGUAGE DeriveDataTypeable #-}
45
{-# LANGUAGE DeriveFunctor #-}
@@ -102,7 +103,11 @@ instance Store SnapshotDef
102103
instance NFData SnapshotDef
103104

104105
snapshotDefVC :: VersionConfig SnapshotDef
106+
#if MIN_VERSION_template_haskell(2,14,0)
107+
snapshotDefVC = storeVersionConfig "sd-v1" "u-V-7pmU0YA-nXZFI0UBIST3JdY="
108+
#else
105109
snapshotDefVC = storeVersionConfig "sd-v1" "CKo7nln8EXkw07Gq-4ATxszNZiE="
110+
#endif
106111

107112
-- | A relative file path including a unique string for the given
108113
-- snapshot.
@@ -310,7 +315,11 @@ instance Store LoadedSnapshot
310315
instance NFData LoadedSnapshot
311316

312317
loadedSnapshotVC :: VersionConfig LoadedSnapshot
318+
#if MIN_VERSION_template_haskell(2,14,0)
319+
loadedSnapshotVC = storeVersionConfig "ls-v5" "Rl-3KjZ1LqhIyGy-o0HCC-I6cRc="
320+
#else
313321
loadedSnapshotVC = storeVersionConfig "ls-v5" "CeSRWh1VU8v0__kwA__msbe6WlU="
322+
#endif
314323

315324
-- | Information on a single package for the 'LoadedSnapshot' which
316325
-- can be installed.

stack-lts-12.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
resolver: lts-12.12
2+
3+
extra-deps:
4+
- Cabal-2.4.0.0@rev:0
5+
- githash-0.1.1.0@rev:0
6+
- hpack-0.31.0@rev:0
7+
- infer-license-0.2.0@rev:0 #for hpack-0.31
8+
- yaml-0.10.4.0@rev:0 #for hpack-0.31
9+
10+
# docker:
11+
# enable: true
12+
# repo: fpco/stack-full
13+
# image:
14+
# containers:
15+
# - base: "fpco/stack-base" # see ./etc/docker/stack-base/Dockerfile
16+
# name: "fpco/stack-test"
17+
nix:
18+
# --nix on the command-line to enable.
19+
enable: false
20+
packages:
21+
- zlib
22+
- unzip
23+
24+
ghc-options:
25+
"$locals": -fhide-source-paths

stack-nightly.yaml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,25 @@
1-
resolver: nightly-2018-09-02
1+
resolver: nightly-2018-10-12
22

33
extra-deps:
4-
- Cabal-2.4.0.0@rev:0
4+
- git: https://github.com/yesodweb/persistent.git
5+
commit: e8e1b723403da2b45baf165dfbedf5abedc06178
6+
subdirs:
7+
- persistent
8+
- persistent-sqlite
9+
- persistent-template
510
- cabal-install-2.4.0.0@rev:1
6-
- http-api-data-0.3.8.1@rev:1
7-
- cabal-doctest-1.0.6@rev:2
8-
- happy-1.19.9@rev:3
11+
- cryptohash-0.11.9@rev:0
12+
- cryptohash-sha256-0.11.101.0@rev:2
13+
- cryptonite-conduit-0.2.2@rev:0
14+
- ed25519-0.0.5.0@rev:2
15+
- hackage-security-0.5.3.0@rev:3
16+
- hpack-0.31.0@rev:0
17+
- infer-license-0.2.0@rev:0
18+
- project-template-0.2.0.1@rev:0
19+
- resolv-0.1.1.1@rev:0
20+
- store-0.5.0@rev:0
21+
- store-core-0.4.4@rev:0
22+
- th-utilities-0.2.0.1@rev:0
923

1024
# docker:
1125
# enable: true

stack.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
resolver: lts-11.19
1+
resolver: lts-11.22
22

33
# docker:
44
# enable: true
@@ -20,11 +20,11 @@ extra-deps:
2020
- Cabal-2.4.0.1@rev:0
2121
- cabal-install-2.4.0.0@rev:1
2222
- resolv-0.1.1.1@rev:0
23-
- infer-license-0.2.0@rev:0
23+
- infer-license-0.2.0@rev:0 #for hpack-0.31
2424
- hpack-0.31.0@rev:0
2525
- http-api-data-0.3.8.1@rev:1
26-
- githash-0.1.0.1@rev:0
27-
- yaml-0.10.1.1@rev:0 #for hpack-0.31
26+
- githash-0.1.1.0@rev:0
27+
- yaml-0.10.4.0@rev:0 #for hpack-0.31
2828
- windns-0.1.0.0@rev:0
2929
- hackage-security-0.5.3.0@rev:2
3030
- cabal-doctest-1.0.6@rev:2

0 commit comments

Comments
 (0)