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 diff --git a/cabal.project b/cabal.project index 5296b1efb..7220178bf 100644 --- a/cabal.project +++ b/cabal.project @@ -1,5 +1,10 @@ packages: . +source-repository-package + type: git + location: https://github.com/Avi-D-coder/implicit-hie-cradle.git + tag: f7bfc24ed036e31c0a758b9ab6665c4999eb4fe0 + 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..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,6 +19,7 @@ extra-deps: - tasty-rerun-1.1.17 - ghc-check-0.5.0.1 - extra-1.7.2 + nix: packages: [zlib] diff --git a/stack810.yaml b/stack810.yaml index bf86b6b4f..4750c2f0b 100644 --- a/stack810.yaml +++ b/stack810.yaml @@ -24,6 +24,9 @@ extra-deps: - dual-tree-0.2.2.1 - force-layout-0.4.0.6 - statestack-0.3 +- implicit-hie-0.1.1.0 +- github: Avi-D-coder/implicit-hie-cradle + commit: f7bfc24ed036e31c0a758b9ab6665c4999eb4fe0 nix: packages: [zlib] diff --git a/stack8101.yaml b/stack8101.yaml index acf357696..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 @@ -24,6 +24,9 @@ extra-deps: - dual-tree-0.2.2.1 - force-layout-0.4.0.6 - statestack-0.3 +- implicit-hie-0.1.1.0 +- github: Avi-D-coder/implicit-hie-cradle + commit: f7bfc24ed036e31c0a758b9ab6665c4999eb4f nix: packages: [zlib] diff --git a/stack84.yaml b/stack84.yaml index 2b1ce7d5d..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 diff --git a/stack88.yaml b/stack88.yaml index 79c913584..27e9ce938 100644 --- a/stack88.yaml +++ b/stack88.yaml @@ -8,6 +8,10 @@ extra-deps: - ghc-check-0.5.0.1 - hie-bios-0.7.1 - extra-1.7.2 +- implicit-hie-0.1.1.0 +- github: Avi-D-coder/implicit-hie-cradle + commit: f7bfc24ed036e31c0a758b9ab6665c4999eb4fe0 + nix: packages: [zlib]