From b5c14863f86b1bcdf2b072e055143a0524616dc6 Mon Sep 17 00:00:00 2001 From: Luke Lau Date: Sat, 1 Dec 2018 18:21:32 +0000 Subject: [PATCH 1/9] Add 8.6.2 to dist and update nightly resolver --- Makefile | 10 +++++++--- stack.yaml | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 93d9a05a7..9e6c3874c 100644 --- a/Makefile +++ b/Makefile @@ -174,7 +174,7 @@ icu-macos-fix-build: # ------------------------------------------------------ -HIE_GIT_REF:=$(shell git symbolic-ref -q --short HEAD || git describe --tags --exact-match) +HIE_GIT_REF:=$(shell git describe --tags) HIE_DIST_NAME:=hie-${HIE_GIT_REF}-`uname -m`-`uname -s` HIE_DIST_DIR:=/tmp/${HIE_DIST_NAME} ## Creates a tarball containing all the hie binaries @@ -189,9 +189,13 @@ dist: stack --stack-yaml=stack-8.4.3.yaml build cp .stack-work/install/*/*/8.4.3/bin/hie ${HIE_DIST_DIR}/hie-8.4.3 stack --stack-yaml=stack-8.4.4.yaml build - cp .stack-work/install/*/*/8.4.4/bin/hie ${HIE_DIST_DIR}/hie cp .stack-work/install/*/*/8.4.4/bin/hie ${HIE_DIST_DIR}/hie-8.4.4 - cp .stack-work/install/*/*/8.4.4/bin/hie-wrapper ${HIE_DIST_DIR}/hie-wrapper + stack --stack-yaml=stack-8.6.1.yaml build + cp .stack-work/install/*/*/8.6.1/bin/hie ${HIE_DIST_DIR}/hie-8.6.1 + stack --stack-yaml=stack-8.6.2.yaml build + cp .stack-work/install/*/*/8.6.2/bin/hie ${HIE_DIST_DIR}/hie-8.6.2 + cp .stack-work/install/*/*/8.6.2/bin/hie ${HIE_DIST_DIR}/hie + cp .stack-work/install/*/*/8.6.2/bin/hie-wrapper ${HIE_DIST_DIR}/hie-wrapper tar -czf ${HIE_DIST_NAME}.tar.gz -C ${HIE_DIST_DIR} . rm -r ${HIE_DIST_DIR} .PHONY: dist diff --git a/stack.yaml b/stack.yaml index edf51d155..ea2220f7c 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,4 +1,4 @@ -resolver: lts-12.20 # GHC 8.4.4 +resolver: nightly-2018-12-01 # GHC 8.6.2 packages: - . - hie-plugin-api From dbd4d7fe5712ad5f753fcb29b4ec469b76977b36 Mon Sep 17 00:00:00 2001 From: Luke Lau Date: Sat, 1 Dec 2018 20:13:09 +0000 Subject: [PATCH 2/9] Update stack.yaml to use 8.6.2 extra-deps --- stack.yaml | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/stack.yaml b/stack.yaml index ea2220f7c..92740a7ca 100644 --- a/stack.yaml +++ b/stack.yaml @@ -4,31 +4,47 @@ packages: - hie-plugin-api extra-deps: -- ./submodules/brittany - ./submodules/HaRe +- ./submodules/brittany +- ./submodules/cabal-helper - ./submodules/ghc-mod - ./submodules/ghc-mod/core -- ./submodules/cabal-helper -# - brittany-0.11.0.0 +- apply-refact-0.6.0.0 +- butcher-1.3.2.1 - cabal-plan-0.4.0.0 - constrained-dynamic-0.1.0.0 -- ghc-exactprint-0.5.8.2 -- haddock-api-2.20.0 -- haddock-library-1.6.0 -- haskell-lsp-0.8.0.1 -- haskell-lsp-types-0.8.0.1 +- ekg-json-0.1.0.6 +- ekg-wai-0.1.0.3 +- haddock-api-2.21.0 - hsimport-0.8.6 -- lsp-test-0.5.0.1 -- pretty-show-1.8.2 +- monad-memo-0.4.1 +- multistate-0.8.0.1 +- resolv-0.1.1.2 - syz-0.2.0.0 - temporary-1.2.1.1 +- yaml-0.8.32 + + + flags: haskell-ide-engine: pedantic: true hie-plugin-api: pedantic: true + # ekg-core: + # allow-newer: true + # ekg-json: + # allow-newer: true + # ekg-wai: + # allow-newer: true + # base: + # allow-newer: true + # process: + # allow-newer: true + +# allow-newer: true nix: packages: [ icu libcxx zlib ] From 9bfa9bb002d33b45c6f5ca6faf632b2f44b3807b Mon Sep 17 00:00:00 2001 From: Luke Lau Date: Thu, 6 Dec 2018 13:50:27 +0000 Subject: [PATCH 3/9] Test out lsp-test from master --- stack-8.2.1.yaml | 3 ++- stack-8.2.2.yaml | 3 ++- stack-8.4.2.yaml | 3 ++- stack-8.4.3.yaml | 3 ++- stack-8.4.4.yaml | 3 ++- stack-8.6.1.yaml | 3 ++- stack-8.6.2.yaml | 3 ++- stack.yaml | 4 +++- 8 files changed, 17 insertions(+), 8 deletions(-) diff --git a/stack-8.2.1.yaml b/stack-8.2.1.yaml index 1641eae3d..129685a07 100644 --- a/stack-8.2.1.yaml +++ b/stack-8.2.1.yaml @@ -22,7 +22,8 @@ extra-deps: - haskell-lsp-types-0.8.0.1 - hlint-2.0.11 - hsimport-0.8.6 -- lsp-test-0.5.0.2 +- github: bubba/lsp-test + commit: master - pretty-show-1.8.2 - sorted-list-0.2.1.0 - syz-0.2.0.0 diff --git a/stack-8.2.2.yaml b/stack-8.2.2.yaml index 378f3db17..0014e4920 100644 --- a/stack-8.2.2.yaml +++ b/stack-8.2.2.yaml @@ -22,7 +22,8 @@ extra-deps: - haskell-lsp-0.8.0.1 - haskell-lsp-types-0.8.0.1 - hsimport-0.8.6 -- lsp-test-0.5.0.2 +- github: bubba/lsp-test + commit: master - pretty-show-1.8.2 - sorted-list-0.2.1.0 - syz-0.2.0.0 diff --git a/stack-8.4.2.yaml b/stack-8.4.2.yaml index 8525d5a80..df5b70c06 100644 --- a/stack-8.4.2.yaml +++ b/stack-8.4.2.yaml @@ -21,7 +21,8 @@ extra-deps: - haskell-lsp-types-0.8.0.1 - hlint-2.1.8 - hsimport-0.8.6 -- lsp-test-0.5.0.2 +- github: bubba/lsp-test + commit: master - pretty-show-1.8.2 - syz-0.2.0.0 - temporary-1.2.1.1 diff --git a/stack-8.4.3.yaml b/stack-8.4.3.yaml index c33a5bcb2..7eb4dd32d 100644 --- a/stack-8.4.3.yaml +++ b/stack-8.4.3.yaml @@ -19,7 +19,8 @@ extra-deps: - haskell-lsp-0.8.0.1 - haskell-lsp-types-0.8.0.1 - hsimport-0.8.6 -- lsp-test-0.5.0.2 +- github: bubba/lsp-test + commit: master - pretty-show-1.8.2 - syz-0.2.0.0 - temporary-1.2.1.1 diff --git a/stack-8.4.4.yaml b/stack-8.4.4.yaml index df2041841..cce811f16 100644 --- a/stack-8.4.4.yaml +++ b/stack-8.4.4.yaml @@ -19,7 +19,8 @@ extra-deps: - haskell-lsp-0.8.0.1 - haskell-lsp-types-0.8.0.1 - hsimport-0.8.6 -- lsp-test-0.5.0.2 +- github: bubba/lsp-test + commit: master - pretty-show-1.8.2 - syz-0.2.0.0 - temporary-1.2.1.1 diff --git a/stack-8.6.1.yaml b/stack-8.6.1.yaml index 6e54de489..d7d47ba89 100644 --- a/stack-8.6.1.yaml +++ b/stack-8.6.1.yaml @@ -27,7 +27,8 @@ extra-deps: - haskell-lsp-0.8.0.1 - haskell-lsp-types-0.8.0.1 - hsimport-0.8.6 -- lsp-test-0.5.0.2 +- github: bubba/lsp-test + commit: master - monad-memo-0.4.1 - monoid-subclasses-0.4.6.1 - multistate-0.8.0.1 diff --git a/stack-8.6.2.yaml b/stack-8.6.2.yaml index 31eee4b9d..4a090e724 100644 --- a/stack-8.6.2.yaml +++ b/stack-8.6.2.yaml @@ -18,7 +18,8 @@ extra-deps: - ekg-wai-0.1.0.3 - haddock-api-2.21.0 - hsimport-0.8.6 -- lsp-test-0.5.0.2 +- github: bubba/lsp-test + commit: master - monad-memo-0.4.1 - multistate-0.8.0.1 - resolv-0.1.1.2 diff --git a/stack.yaml b/stack.yaml index 8306a0b5f..dc91e2a83 100644 --- a/stack.yaml +++ b/stack.yaml @@ -21,7 +21,9 @@ extra-deps: - monad-memo-0.4.1 - multistate-0.8.0.1 - resolv-0.1.1.2 -- lsp-test-0.5.0.2 +# - lsp-test-0.5.0.2 +- github: bubba/lsp-test + commit: master - pretty-show-1.8.2 - syz-0.2.0.0 - temporary-1.2.1.1 From c9646ebe586850fee2c5fd3a8df6e40213a7af62 Mon Sep 17 00:00:00 2001 From: Luke Lau Date: Thu, 6 Dec 2018 14:22:55 +0000 Subject: [PATCH 4/9] Add HIE_CACHE env var --- .circleci/config.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 34660a77d..e4e38d3d8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -22,9 +22,9 @@ defaults: &defaults - restore_cache: keys: - - stack-cache-12-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "stack-build.txt" }}-{{ checksum "all-cabal.txt" }} - - stack-cache-12-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "stack-build.txt" }} - - stack-cache-12-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "resolver.txt" }} + - stack-cache-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "stack-build.txt" }}-{{ checksum "all-cabal.txt" }} + - stack-cache-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "stack-build.txt" }} + - stack-cache-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "resolver.txt" }} - run: name: Stack setup @@ -59,7 +59,7 @@ defaults: &defaults command: rm -fr ~/.cache/cabal-helper - save_cache: - key: stack-cache-12-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "resolver.txt" }} + key: stack-cache-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "resolver.txt" }} paths: - ~/.stack - ~/.cache @@ -81,7 +81,7 @@ defaults: &defaults path: test-logs - save_cache: - key: stack-cache-12-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "stack-build.txt" }} + key: stack-cache-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "stack-build.txt" }} paths: - ~/.stack - ~/.cache @@ -94,7 +94,7 @@ defaults: &defaults - ~/build/submodules/cabal-helper/.stack-work - save_cache: - key: stack-cache-12-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "stack-build.txt" }}-{{ checksum "all-cabal.txt" }} + key: stack-cache-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "stack-build.txt" }}-{{ checksum "all-cabal.txt" }} paths: - ~/.stack - ~/.cache @@ -168,7 +168,7 @@ jobs: command: git submodule update --recursive --init - restore-cache: keys: - - cabal-12-{{ arch }}-{{ .Environment.CIRCLE_JOB }} + - cabal-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }} - run: name: Cabal version command: cabal --version @@ -182,7 +182,7 @@ jobs: name: Build command: cabal new-build -j2 - save_cache: - key: cabal-12-{{ arch }}-{{ .Environment.CIRCLE_JOB }} + key: cabal-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }} paths: - ~/.cabal From 71b210806d5a8260d3d1f36cf5f55a52113181c3 Mon Sep 17 00:00:00 2001 From: Luke Lau Date: Thu, 6 Dec 2018 15:36:15 +0000 Subject: [PATCH 5/9] Try running flaky tests last? --- haskell-ide-engine.cabal | 2 +- test/functional/{CommandSpec.hs => ZCommandSpec.hs} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename test/functional/{CommandSpec.hs => ZCommandSpec.hs} (97%) diff --git a/haskell-ide-engine.cabal b/haskell-ide-engine.cabal index d5cd24d1a..0acb4f400 100644 --- a/haskell-ide-engine.cabal +++ b/haskell-ide-engine.cabal @@ -284,7 +284,7 @@ test-suite func-test , test/utils main-is: Main.hs other-modules: CompletionSpec - , CommandSpec + , ZCommandSpec , DeferredSpec , DefinitionSpec , DiagnosticsSpec diff --git a/test/functional/CommandSpec.hs b/test/functional/ZCommandSpec.hs similarity index 97% rename from test/functional/CommandSpec.hs rename to test/functional/ZCommandSpec.hs index c85fa0654..d828b0c87 100644 --- a/test/functional/CommandSpec.hs +++ b/test/functional/ZCommandSpec.hs @@ -1,5 +1,5 @@ {-# LANGUAGE OverloadedStrings #-} -module CommandSpec where +module ZCommandSpec where import Control.Lens hiding (List) import Control.Monad.IO.Class From 9bc33eef5c1e06d00e81bcf74edd2eaaa4dc2ba9 Mon Sep 17 00:00:00 2001 From: Luke Lau Date: Thu, 6 Dec 2018 16:47:40 +0000 Subject: [PATCH 6/9] Revert "Try running flaky tests last?" This reverts commit 71b210806d5a8260d3d1f36cf5f55a52113181c3. --- haskell-ide-engine.cabal | 2 +- test/functional/{ZCommandSpec.hs => CommandSpec.hs} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename test/functional/{ZCommandSpec.hs => CommandSpec.hs} (97%) diff --git a/haskell-ide-engine.cabal b/haskell-ide-engine.cabal index 0acb4f400..d5cd24d1a 100644 --- a/haskell-ide-engine.cabal +++ b/haskell-ide-engine.cabal @@ -284,7 +284,7 @@ test-suite func-test , test/utils main-is: Main.hs other-modules: CompletionSpec - , ZCommandSpec + , CommandSpec , DeferredSpec , DefinitionSpec , DiagnosticsSpec diff --git a/test/functional/ZCommandSpec.hs b/test/functional/CommandSpec.hs similarity index 97% rename from test/functional/ZCommandSpec.hs rename to test/functional/CommandSpec.hs index d828b0c87..c85fa0654 100644 --- a/test/functional/ZCommandSpec.hs +++ b/test/functional/CommandSpec.hs @@ -1,5 +1,5 @@ {-# LANGUAGE OverloadedStrings #-} -module ZCommandSpec where +module CommandSpec where import Control.Lens hiding (List) import Control.Monad.IO.Class From 72854e4eb43c167409eba75e81de17a9e2d87652 Mon Sep 17 00:00:00 2001 From: Luke Lau Date: Thu, 6 Dec 2018 16:47:43 +0000 Subject: [PATCH 7/9] Revert "Test out lsp-test from master" This reverts commit 9bfa9bb002d33b45c6f5ca6faf632b2f44b3807b. --- stack-8.2.1.yaml | 3 +-- stack-8.2.2.yaml | 3 +-- stack-8.4.2.yaml | 3 +-- stack-8.4.3.yaml | 3 +-- stack-8.4.4.yaml | 3 +-- stack-8.6.1.yaml | 3 +-- stack-8.6.2.yaml | 3 +-- stack.yaml | 4 +--- 8 files changed, 8 insertions(+), 17 deletions(-) diff --git a/stack-8.2.1.yaml b/stack-8.2.1.yaml index 129685a07..1641eae3d 100644 --- a/stack-8.2.1.yaml +++ b/stack-8.2.1.yaml @@ -22,8 +22,7 @@ extra-deps: - haskell-lsp-types-0.8.0.1 - hlint-2.0.11 - hsimport-0.8.6 -- github: bubba/lsp-test - commit: master +- lsp-test-0.5.0.2 - pretty-show-1.8.2 - sorted-list-0.2.1.0 - syz-0.2.0.0 diff --git a/stack-8.2.2.yaml b/stack-8.2.2.yaml index 0014e4920..378f3db17 100644 --- a/stack-8.2.2.yaml +++ b/stack-8.2.2.yaml @@ -22,8 +22,7 @@ extra-deps: - haskell-lsp-0.8.0.1 - haskell-lsp-types-0.8.0.1 - hsimport-0.8.6 -- github: bubba/lsp-test - commit: master +- lsp-test-0.5.0.2 - pretty-show-1.8.2 - sorted-list-0.2.1.0 - syz-0.2.0.0 diff --git a/stack-8.4.2.yaml b/stack-8.4.2.yaml index df5b70c06..8525d5a80 100644 --- a/stack-8.4.2.yaml +++ b/stack-8.4.2.yaml @@ -21,8 +21,7 @@ extra-deps: - haskell-lsp-types-0.8.0.1 - hlint-2.1.8 - hsimport-0.8.6 -- github: bubba/lsp-test - commit: master +- lsp-test-0.5.0.2 - pretty-show-1.8.2 - syz-0.2.0.0 - temporary-1.2.1.1 diff --git a/stack-8.4.3.yaml b/stack-8.4.3.yaml index 7eb4dd32d..c33a5bcb2 100644 --- a/stack-8.4.3.yaml +++ b/stack-8.4.3.yaml @@ -19,8 +19,7 @@ extra-deps: - haskell-lsp-0.8.0.1 - haskell-lsp-types-0.8.0.1 - hsimport-0.8.6 -- github: bubba/lsp-test - commit: master +- lsp-test-0.5.0.2 - pretty-show-1.8.2 - syz-0.2.0.0 - temporary-1.2.1.1 diff --git a/stack-8.4.4.yaml b/stack-8.4.4.yaml index cce811f16..df2041841 100644 --- a/stack-8.4.4.yaml +++ b/stack-8.4.4.yaml @@ -19,8 +19,7 @@ extra-deps: - haskell-lsp-0.8.0.1 - haskell-lsp-types-0.8.0.1 - hsimport-0.8.6 -- github: bubba/lsp-test - commit: master +- lsp-test-0.5.0.2 - pretty-show-1.8.2 - syz-0.2.0.0 - temporary-1.2.1.1 diff --git a/stack-8.6.1.yaml b/stack-8.6.1.yaml index d7d47ba89..6e54de489 100644 --- a/stack-8.6.1.yaml +++ b/stack-8.6.1.yaml @@ -27,8 +27,7 @@ extra-deps: - haskell-lsp-0.8.0.1 - haskell-lsp-types-0.8.0.1 - hsimport-0.8.6 -- github: bubba/lsp-test - commit: master +- lsp-test-0.5.0.2 - monad-memo-0.4.1 - monoid-subclasses-0.4.6.1 - multistate-0.8.0.1 diff --git a/stack-8.6.2.yaml b/stack-8.6.2.yaml index 4a090e724..31eee4b9d 100644 --- a/stack-8.6.2.yaml +++ b/stack-8.6.2.yaml @@ -18,8 +18,7 @@ extra-deps: - ekg-wai-0.1.0.3 - haddock-api-2.21.0 - hsimport-0.8.6 -- github: bubba/lsp-test - commit: master +- lsp-test-0.5.0.2 - monad-memo-0.4.1 - multistate-0.8.0.1 - resolv-0.1.1.2 diff --git a/stack.yaml b/stack.yaml index dc91e2a83..8306a0b5f 100644 --- a/stack.yaml +++ b/stack.yaml @@ -21,9 +21,7 @@ extra-deps: - monad-memo-0.4.1 - multistate-0.8.0.1 - resolv-0.1.1.2 -# - lsp-test-0.5.0.2 -- github: bubba/lsp-test - commit: master +- lsp-test-0.5.0.2 - pretty-show-1.8.2 - syz-0.2.0.0 - temporary-1.2.1.1 From a17fc7c307551d7e700a6677d1a8e0cc3341742f Mon Sep 17 00:00:00 2001 From: Luke Lau Date: Thu, 6 Dec 2018 16:55:54 +0000 Subject: [PATCH 8/9] Try warming up HIE cache beforehand in functional tests --- test/functional/DiagnosticsSpec.hs | 2 +- test/functional/Main.hs | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/test/functional/DiagnosticsSpec.hs b/test/functional/DiagnosticsSpec.hs index 4d268a296..95f941cd3 100644 --- a/test/functional/DiagnosticsSpec.hs +++ b/test/functional/DiagnosticsSpec.hs @@ -17,7 +17,7 @@ import Utils spec :: Spec spec = describe "diagnostics providers" $ do - describe "diagnostics triggers" $ do + describe "diagnostics triggers" $ it "runs diagnostics on save" $ runSession hieCommandExamplePlugin codeActionSupportCaps "test/testdata" $ do -- runSessionWithConfig logConfig hieCommandExamplePlugin codeActionSupportCaps "test/testdata" $ do diff --git a/test/functional/Main.hs b/test/functional/Main.hs index 47d4737e8..fe7216100 100644 --- a/test/functional/Main.hs +++ b/test/functional/Main.hs @@ -1,11 +1,17 @@ module Main where -import Test.Hspec +import Control.Monad.IO.Class +import Language.Haskell.LSP.Test import qualified FunctionalSpec -import TestUtils +import Test.Hspec +import TestUtils main :: IO () main = do setupStackFiles + -- run a test session to warm up the cache to prevent timeouts in other tests + putStrLn "Warming up HIE cache..." + runSessionWithConfig (defaultConfig { messageTimeout = 120 }) hieCommand fullCaps "test/testdata" $ + liftIO $ putStrLn "HIE cache is warmed up" -- withFileLogging "functional.log" $ hspec FunctionalSpec.spec withFileLogging logFilePath $ hspec FunctionalSpec.spec From 7133547a560ee8102ea4b74578010e5f49030d8d Mon Sep 17 00:00:00 2001 From: Luke Lau Date: Thu, 6 Dec 2018 21:59:15 +0000 Subject: [PATCH 9/9] Make hpack test more loose on the accepted diagnostics --- test/functional/FunctionalCodeActionsSpec.hs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/test/functional/FunctionalCodeActionsSpec.hs b/test/functional/FunctionalCodeActionsSpec.hs index a82eed3e8..c13c130d4 100644 --- a/test/functional/FunctionalCodeActionsSpec.hs +++ b/test/functional/FunctionalCodeActionsSpec.hs @@ -186,11 +186,10 @@ spec = describe "code actions" $ do -- ignore the first empty hlint diagnostic publish [_,diag:_] <- count 2 waitForDiagnostics - if ghcVersion == GHC86 - then - liftIO $ diag ^. L.message `shouldSatisfy` T.isPrefixOf "Could not load module ‘Codec.Compression.GZip’" - else - liftIO $ diag ^. L.message `shouldSatisfy` T.isPrefixOf "Could not find module ‘Codec.Compression.GZip’" + let preds = [ T.isPrefixOf "Could not load module ‘Codec.Compression.GZip’" + , T.isPrefixOf "Could not find module ‘Codec.Compression.GZip’" + ] + in liftIO $ diag ^. L.message `shouldSatisfy` \x -> any (\f -> f x) preds mActions <- getAllCodeActions doc let allActions = map fromAction mActions