From eac72d12c5e2374a39ab60b025eac6d1f2590b4e Mon Sep 17 00:00:00 2001 From: jneira Date: Thu, 10 Sep 2020 23:43:36 +0200 Subject: [PATCH 1/4] Use implicit-hie when no explicit hie.yaml --- cabal.project | 5 +++++ ghcide.cabal | 5 +---- session-loader/Development/IDE/Session.hs | 3 ++- stack.yaml | 2 ++ stack810.yaml | 2 ++ stack8101.yaml | 2 ++ stack84.yaml | 2 ++ stack88.yaml | 2 ++ 8 files changed, 18 insertions(+), 5 deletions(-) diff --git a/cabal.project b/cabal.project index 5296b1efb..9b8d220f6 100644 --- a/cabal.project +++ b/cabal.project @@ -1,5 +1,10 @@ packages: . +source-repository-package + type: git + location: https://github.com/jneira/implicit-hie-cradle.git + tag: 8aa1b4400f1be3c8acf5b8fac398995d0b0eb982 + allow-newer: active:base, diagrams-contrib:base, diff --git a/ghcide.cabal b/ghcide.cabal index 47b6a6dce..9eccbf81c 100644 --- a/ghcide.cabal +++ b/ghcide.cabal @@ -87,6 +87,7 @@ library ghc-paths, cryptohash-sha1 >=0.11.100 && <0.12, hie-bios >= 0.7.1 && < 0.8.0, + implicit-hie-cradle >= 0.1.0.0 && < 0.2.0, base16-bytestring >=0.1.1 && <0.2 if os(windows) build-depends: @@ -201,10 +202,6 @@ library Development.IDE.GHC.HieAst Development.IDE.GHC.HieBin ghc-options: -Wall -Wno-name-shadowing -Wincomplete-uni-patterns - -- This is needed to prevent a GHC crash when building - -- Development.IDE.Session with stack on 8.10.1 on Windows - if (impl(ghc > 8.9) && os(windows)) - ghc-options: -fexternal-interpreter executable ghcide-test-preprocessor default-language: Haskell2010 diff --git a/session-loader/Development/IDE/Session.hs b/session-loader/Development/IDE/Session.hs index 885290a1e..a930fbc29 100644 --- a/session-loader/Development/IDE/Session.hs +++ b/session-loader/Development/IDE/Session.hs @@ -48,6 +48,7 @@ import GHC.Check import HIE.Bios import HIE.Bios.Environment hiding (getCacheDir) import HIE.Bios.Types +import Hie.Implicit.Cradle (loadImplicitHieCradle) import Language.Haskell.LSP.Core import Language.Haskell.LSP.Messages import Language.Haskell.LSP.Types @@ -232,7 +233,7 @@ loadSession dir = do when optTesting $ eventer $ notifyCradleLoaded cfp logInfo logger $ T.pack ("Consulting the cradle for " <> show cfp) - cradle <- maybe (loadImplicitCradle $ addTrailingPathSeparator dir) loadCradle hieYaml + cradle <- maybe (loadImplicitHieCradle $ addTrailingPathSeparator dir) loadCradle hieYaml -- Display a user friendly progress message here: They probably don't know what a -- cradle is let progMsg = "Setting up " <> T.pack (takeBaseName (cradleRootDir cradle)) diff --git a/stack.yaml b/stack.yaml index 6a327383c..f910b2e5c 100644 --- a/stack.yaml +++ b/stack.yaml @@ -16,6 +16,8 @@ extra-deps: - tasty-rerun-1.1.17 - ghc-check-0.5.0.1 - extra-1.7.2 +- implicit-hie-0.1.1.0 +- implicit-hie-cradle-0.1.0.0 nix: packages: [zlib] diff --git a/stack810.yaml b/stack810.yaml index bf86b6b4f..90249a4a6 100644 --- a/stack810.yaml +++ b/stack810.yaml @@ -24,6 +24,8 @@ extra-deps: - dual-tree-0.2.2.1 - force-layout-0.4.0.6 - statestack-0.3 +- implicit-hie-0.1.1.0 +- implicit-hie-cradle-0.1.0.0 nix: packages: [zlib] diff --git a/stack8101.yaml b/stack8101.yaml index acf357696..4a9033d34 100644 --- a/stack8101.yaml +++ b/stack8101.yaml @@ -24,6 +24,8 @@ extra-deps: - dual-tree-0.2.2.1 - force-layout-0.4.0.6 - statestack-0.3 +- implicit-hie-0.1.1.0 +- implicit-hie-cradle-0.1.0.0 nix: packages: [zlib] diff --git a/stack84.yaml b/stack84.yaml index 2b1ce7d5d..79d70d82c 100644 --- a/stack84.yaml +++ b/stack84.yaml @@ -24,6 +24,8 @@ extra-deps: - heaps-0.3.6.1 - ghc-check-0.5.0.1 - extra-1.7.2 +- implicit-hie-0.1.1.0 +- implicit-hie-cradle-0.1.0.0 # For tasty-retun - ansi-terminal-0.10.3 - ansi-wl-pprint-0.6.9 diff --git a/stack88.yaml b/stack88.yaml index 79c913584..58bc1f07b 100644 --- a/stack88.yaml +++ b/stack88.yaml @@ -8,6 +8,8 @@ extra-deps: - ghc-check-0.5.0.1 - hie-bios-0.7.1 - extra-1.7.2 +- implicit-hie-0.1.1.0 +- implicit-hie-cradle-0.1.0.0 nix: packages: [zlib] From 66e283216d4b7902823bebf954f996978b9eac5d Mon Sep 17 00:00:00 2001 From: jneira Date: Fri, 11 Sep 2020 07:58:04 +0200 Subject: [PATCH 2/4] Use implicit-hie-cradle master in all build config files --- cabal.project | 4 ++-- stack.yaml | 6 ++++-- stack810.yaml | 3 ++- stack8101.yaml | 3 ++- stack84.yaml | 5 +++-- stack88.yaml | 4 +++- 6 files changed, 16 insertions(+), 9 deletions(-) diff --git a/cabal.project b/cabal.project index 9b8d220f6..7220178bf 100644 --- a/cabal.project +++ b/cabal.project @@ -2,8 +2,8 @@ packages: . source-repository-package type: git - location: https://github.com/jneira/implicit-hie-cradle.git - tag: 8aa1b4400f1be3c8acf5b8fac398995d0b0eb982 + location: https://github.com/Avi-D-coder/implicit-hie-cradle.git + tag: f7bfc24ed036e31c0a758b9ab6665c4999eb4fe0 allow-newer: active:base, diff --git a/stack.yaml b/stack.yaml index f910b2e5c..138d9e841 100644 --- a/stack.yaml +++ b/stack.yaml @@ -6,6 +6,9 @@ extra-deps: - haskell-lsp-types-0.22.0.0 - lsp-test-0.11.0.5 - hie-bios-0.7.1 +- implicit-hie-0.1.1.0 +- github: Avi-D-coder/implicit-hie-cradle + commit: f7bfc24ed036e31c0a758b9ab6665c4999eb4fe0 - fuzzy-0.1.0.0 - regex-pcre-builtin-0.95.1.1.8.43 - regex-base-0.94.0.0 @@ -16,8 +19,7 @@ extra-deps: - tasty-rerun-1.1.17 - ghc-check-0.5.0.1 - extra-1.7.2 -- implicit-hie-0.1.1.0 -- implicit-hie-cradle-0.1.0.0 + nix: packages: [zlib] diff --git a/stack810.yaml b/stack810.yaml index 90249a4a6..4750c2f0b 100644 --- a/stack810.yaml +++ b/stack810.yaml @@ -25,7 +25,8 @@ extra-deps: - force-layout-0.4.0.6 - statestack-0.3 - implicit-hie-0.1.1.0 -- implicit-hie-cradle-0.1.0.0 +- github: Avi-D-coder/implicit-hie-cradle + commit: f7bfc24ed036e31c0a758b9ab6665c4999eb4fe0 nix: packages: [zlib] diff --git a/stack8101.yaml b/stack8101.yaml index 4a9033d34..b5e6934fa 100644 --- a/stack8101.yaml +++ b/stack8101.yaml @@ -25,7 +25,8 @@ extra-deps: - force-layout-0.4.0.6 - statestack-0.3 - implicit-hie-0.1.1.0 -- implicit-hie-cradle-0.1.0.0 +- github: Avi-D-coder/implicit-hie-cradle + commit: f7bfc24ed036e31c0a758b9ab6665c4999eb4f nix: packages: [zlib] diff --git a/stack84.yaml b/stack84.yaml index 79d70d82c..9f4e2e730 100644 --- a/stack84.yaml +++ b/stack84.yaml @@ -12,6 +12,9 @@ extra-deps: - filepattern-0.1.1 - js-dgtable-0.5.2 - hie-bios-0.7.1 +- implicit-hie-0.1.1.0 +- github: Avi-D-coder/implicit-hie-cradle + commit: f7bfc24ed036e31c0a758b9ab6665c4999eb4fe0 - fuzzy-0.1.0.0 - shake-0.18.5 - time-compat-1.9.2.2 @@ -24,8 +27,6 @@ extra-deps: - heaps-0.3.6.1 - ghc-check-0.5.0.1 - extra-1.7.2 -- implicit-hie-0.1.1.0 -- implicit-hie-cradle-0.1.0.0 # For tasty-retun - ansi-terminal-0.10.3 - ansi-wl-pprint-0.6.9 diff --git a/stack88.yaml b/stack88.yaml index 58bc1f07b..27e9ce938 100644 --- a/stack88.yaml +++ b/stack88.yaml @@ -9,7 +9,9 @@ extra-deps: - hie-bios-0.7.1 - extra-1.7.2 - implicit-hie-0.1.1.0 -- implicit-hie-cradle-0.1.0.0 +- github: Avi-D-coder/implicit-hie-cradle + commit: f7bfc24ed036e31c0a758b9ab6665c4999eb4fe0 + nix: packages: [zlib] From bffd8b3009a252aa8be5118ad7049bf06d62527b Mon Sep 17 00:00:00 2001 From: jneira Date: Fri, 11 Sep 2020 10:39:04 +0200 Subject: [PATCH 3/4] Set correct hie-bios version for ghc-8.10.1 --- stack8101.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stack8101.yaml b/stack8101.yaml index b5e6934fa..57471bad7 100644 --- a/stack8101.yaml +++ b/stack8101.yaml @@ -7,7 +7,7 @@ extra-deps: - haskell-lsp-types-0.22.0.0 - lsp-test-0.11.0.2 - ghc-check-0.5.0.1 -- hie-bios-0.6.1 +- hie-bios-0.7.1 # not yet in stackage - Chart-diagrams-1.9.3 From a654eb5d08698ac8b2c6bd52ffc8bbf81563e47a Mon Sep 17 00:00:00 2001 From: jneira Date: Sun, 13 Sep 2020 00:29:12 +0200 Subject: [PATCH 4/4] Fix windows ci build --- .azure/windows-stack.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.azure/windows-stack.yml b/.azure/windows-stack.yml index e09f6095a..70f789b2c 100644 --- a/.azure/windows-stack.yml +++ b/.azure/windows-stack.yml @@ -49,15 +49,15 @@ jobs: stack install cabal-install --stack-yaml $STACK_YAML # GHC 8.10 keeps crashing with various kinds of access violations and other # errors so we retry 3 times. - if [ "$STACK_YAML" = "stack810.yaml" ]; then - stack build --only-dependencies --stack-yaml $STACK_YAML || stack build --only-dependencies --stack-yaml $STACK_YAML || stack build --only-dependencies --stack-yaml $STACK_YAML + if [ "$STACK_YAML" = "stack8101.yaml" ]; then + stack build --only-dependencies --stack-yaml $STACK_YAML --ghc-options="-fexternal-interpreter" || stack build --only-dependencies --stack-yaml $STACK_YAML --ghc-options="-fexternal-interpreter" || stack build --only-dependencies --stack-yaml $STACK_YAML --ghc-options="-fexternal-interpreter" else stack build --only-dependencies --stack-yaml $STACK_YAML fi displayName: 'stack build --only-dependencies' - bash: | - if [ "$STACK_YAML" = "stack810.yaml" ]; then - stack test --no-run-tests --ghc-options=-Werror --stack-yaml $STACK_YAML || stack test --no-run-tests --ghc-options=-Werror --stack-yaml $STACK_YAML || stack test --no-run-tests --ghc-options=-Werror --stack-yaml $STACK_YAML + if [ "$STACK_YAML" = "stack8101.yaml" ]; then + stack test --no-run-tests --ghc-options="-Werror -fexternal-interpreter" --stack-yaml $STACK_YAML || stack test --no-run-tests --ghc-options="-Werror -fexternal-interpreter" --stack-yaml $STACK_YAML || stack test --no-run-tests --ghc-options="-Werror -fexternal-interpreter" --stack-yaml $STACK_YAML else stack test --no-run-tests --ghc-options=-Werror --stack-yaml $STACK_YAML fi