Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

Commit ea2cf09

Browse files
authored
Merge pull request #968 from bubba/8.6.2-dist
Add 8.6.2 to dist and update nightly resolver
2 parents fe37051 + 7133547 commit ea2cf09

File tree

6 files changed

+55
-28
lines changed

6 files changed

+55
-28
lines changed

.circleci/config.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ defaults: &defaults
2222

2323
- restore_cache:
2424
keys:
25-
- stack-cache-12-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "stack-build.txt" }}-{{ checksum "all-cabal.txt" }}
26-
- stack-cache-12-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "stack-build.txt" }}
27-
- stack-cache-12-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "resolver.txt" }}
25+
- stack-cache-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "stack-build.txt" }}-{{ checksum "all-cabal.txt" }}
26+
- stack-cache-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "stack-build.txt" }}
27+
- stack-cache-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "resolver.txt" }}
2828

2929
- run:
3030
name: Stack setup
@@ -59,7 +59,7 @@ defaults: &defaults
5959
command: rm -fr ~/.cache/cabal-helper
6060

6161
- save_cache:
62-
key: stack-cache-12-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "resolver.txt" }}
62+
key: stack-cache-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "resolver.txt" }}
6363
paths:
6464
- ~/.stack
6565
- ~/.cache
@@ -81,7 +81,7 @@ defaults: &defaults
8181
path: test-logs
8282

8383
- save_cache:
84-
key: stack-cache-12-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "stack-build.txt" }}
84+
key: stack-cache-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "stack-build.txt" }}
8585
paths:
8686
- ~/.stack
8787
- ~/.cache
@@ -94,7 +94,7 @@ defaults: &defaults
9494
- ~/build/submodules/cabal-helper/.stack-work
9595

9696
- save_cache:
97-
key: stack-cache-12-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "stack-build.txt" }}-{{ checksum "all-cabal.txt" }}
97+
key: stack-cache-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "stack-build.txt" }}-{{ checksum "all-cabal.txt" }}
9898
paths:
9999
- ~/.stack
100100
- ~/.cache
@@ -168,7 +168,7 @@ jobs:
168168
command: git submodule update --recursive --init
169169
- restore-cache:
170170
keys:
171-
- cabal-12-{{ arch }}-{{ .Environment.CIRCLE_JOB }}
171+
- cabal-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}
172172
- run:
173173
name: Cabal version
174174
command: cabal --version
@@ -182,7 +182,7 @@ jobs:
182182
name: Build
183183
command: cabal new-build -j2
184184
- save_cache:
185-
key: cabal-12-{{ arch }}-{{ .Environment.CIRCLE_JOB }}
185+
key: cabal-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}
186186
paths:
187187
- ~/.cabal
188188

Makefile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ icu-macos-fix-build:
174174

175175
# ------------------------------------------------------
176176

177-
HIE_GIT_REF:=$(shell git symbolic-ref -q --short HEAD || git describe --tags --exact-match)
177+
HIE_GIT_REF:=$(shell git describe --tags)
178178
HIE_DIST_NAME:=hie-${HIE_GIT_REF}-`uname -m`-`uname -s`
179179
HIE_DIST_DIR:=/tmp/${HIE_DIST_NAME}
180180
## Creates a tarball containing all the hie binaries
@@ -189,9 +189,13 @@ dist:
189189
stack --stack-yaml=stack-8.4.3.yaml build
190190
cp .stack-work/install/*/*/8.4.3/bin/hie ${HIE_DIST_DIR}/hie-8.4.3
191191
stack --stack-yaml=stack-8.4.4.yaml build
192-
cp .stack-work/install/*/*/8.4.4/bin/hie ${HIE_DIST_DIR}/hie
193192
cp .stack-work/install/*/*/8.4.4/bin/hie ${HIE_DIST_DIR}/hie-8.4.4
194-
cp .stack-work/install/*/*/8.4.4/bin/hie-wrapper ${HIE_DIST_DIR}/hie-wrapper
193+
stack --stack-yaml=stack-8.6.1.yaml build
194+
cp .stack-work/install/*/*/8.6.1/bin/hie ${HIE_DIST_DIR}/hie-8.6.1
195+
stack --stack-yaml=stack-8.6.2.yaml build
196+
cp .stack-work/install/*/*/8.6.2/bin/hie ${HIE_DIST_DIR}/hie-8.6.2
197+
cp .stack-work/install/*/*/8.6.2/bin/hie ${HIE_DIST_DIR}/hie
198+
cp .stack-work/install/*/*/8.6.2/bin/hie-wrapper ${HIE_DIST_DIR}/hie-wrapper
195199
tar -czf ${HIE_DIST_NAME}.tar.gz -C ${HIE_DIST_DIR} .
196200
rm -r ${HIE_DIST_DIR}
197201
.PHONY: dist

stack.yaml

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,52 @@
1-
resolver: lts-12.20 # GHC 8.4.4
1+
resolver: nightly-2018-12-01 # GHC 8.6.2
22
packages:
33
- .
44
- hie-plugin-api
55

66
extra-deps:
7-
- ./submodules/brittany
87
- ./submodules/HaRe
8+
- ./submodules/brittany
9+
- ./submodules/cabal-helper
910
- ./submodules/ghc-mod
1011
- ./submodules/ghc-mod/core
11-
- ./submodules/cabal-helper
1212

13-
# - brittany-0.11.0.0
13+
- apply-refact-0.6.0.0
14+
- butcher-1.3.2.1
1415
- cabal-plan-0.4.0.0
1516
- constrained-dynamic-0.1.0.0
16-
- ghc-exactprint-0.5.8.2
17-
- haddock-api-2.20.0
18-
- haddock-library-1.6.0
19-
- haskell-lsp-0.8.0.1
20-
- haskell-lsp-types-0.8.0.1
17+
- ekg-json-0.1.0.6
18+
- ekg-wai-0.1.0.3
19+
- haddock-api-2.21.0
2120
- hsimport-0.8.6
21+
- monad-memo-0.4.1
22+
- multistate-0.8.0.1
23+
- resolv-0.1.1.2
2224
- lsp-test-0.5.0.2
2325
- pretty-show-1.8.2
2426
- syz-0.2.0.0
2527
- temporary-1.2.1.1
28+
- yaml-0.8.32
29+
30+
31+
2632

2733
flags:
2834
haskell-ide-engine:
2935
pedantic: true
3036
hie-plugin-api:
3137
pedantic: true
38+
# ekg-core:
39+
# allow-newer: true
40+
# ekg-json:
41+
# allow-newer: true
42+
# ekg-wai:
43+
# allow-newer: true
44+
# base:
45+
# allow-newer: true
46+
# process:
47+
# allow-newer: true
48+
49+
# allow-newer: true
3250

3351
nix:
3452
packages: [ icu libcxx zlib ]

test/functional/DiagnosticsSpec.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import Utils
1717

1818
spec :: Spec
1919
spec = describe "diagnostics providers" $ do
20-
describe "diagnostics triggers" $ do
20+
describe "diagnostics triggers" $
2121
it "runs diagnostics on save" $
2222
runSession hieCommandExamplePlugin codeActionSupportCaps "test/testdata" $ do
2323
-- runSessionWithConfig logConfig hieCommandExamplePlugin codeActionSupportCaps "test/testdata" $ do

test/functional/FunctionalCodeActionsSpec.hs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -186,11 +186,10 @@ spec = describe "code actions" $ do
186186
-- ignore the first empty hlint diagnostic publish
187187
[_,diag:_] <- count 2 waitForDiagnostics
188188

189-
if ghcVersion == GHC86
190-
then
191-
liftIO $ diag ^. L.message `shouldSatisfy` T.isPrefixOf "Could not load module ‘Codec.Compression.GZip’"
192-
else
193-
liftIO $ diag ^. L.message `shouldSatisfy` T.isPrefixOf "Could not find module ‘Codec.Compression.GZip’"
189+
let preds = [ T.isPrefixOf "Could not load module ‘Codec.Compression.GZip’"
190+
, T.isPrefixOf "Could not find module ‘Codec.Compression.GZip’"
191+
]
192+
in liftIO $ diag ^. L.message `shouldSatisfy` \x -> any (\f -> f x) preds
194193

195194
mActions <- getAllCodeActions doc
196195
let allActions = map fromAction mActions

test/functional/Main.hs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
module Main where
22

3-
import Test.Hspec
3+
import Control.Monad.IO.Class
4+
import Language.Haskell.LSP.Test
45
import qualified FunctionalSpec
5-
import TestUtils
6+
import Test.Hspec
7+
import TestUtils
68

79
main :: IO ()
810
main = do
911
setupStackFiles
12+
-- run a test session to warm up the cache to prevent timeouts in other tests
13+
putStrLn "Warming up HIE cache..."
14+
runSessionWithConfig (defaultConfig { messageTimeout = 120 }) hieCommand fullCaps "test/testdata" $
15+
liftIO $ putStrLn "HIE cache is warmed up"
1016
-- withFileLogging "functional.log" $ hspec FunctionalSpec.spec
1117
withFileLogging logFilePath $ hspec FunctionalSpec.spec

0 commit comments

Comments
 (0)