From caf0a0dd40db857bd98f79534fb763f2c19bf3a0 Mon Sep 17 00:00:00 2001 From: Avi Dessauer Date: Tue, 26 May 2020 18:47:34 -0400 Subject: [PATCH] Use implicit-hie cradle --- cabal.project | 10 ++++++++++ exe/Main.hs | 3 ++- haskell-language-server.cabal | 1 + stack-8.10.1.yaml | 7 ++++++- stack-8.6.4.yaml | 6 +++++- stack-8.6.5.yaml | 6 +++++- stack-8.8.2.yaml | 6 +++++- stack-8.8.3.yaml | 6 +++++- stack.yaml | 6 +++++- 9 files changed, 44 insertions(+), 7 deletions(-) diff --git a/cabal.project b/cabal.project index 3d0f6514886..55931dc889e 100644 --- a/cabal.project +++ b/cabal.project @@ -13,6 +13,16 @@ source-repository-package location: https://github.com/peti/cabal-plan tag: 894b76c0b6bf8f7d2f881431df1f13959a8fce87 +source-repository-package + type: git + location: https://github.com/mpickering/hie-bios + tag: a852cffb0deb306cd1e1fe02aa50d50c77aeb15d + +source-repository-package + type: git + location: https://github.com/Avi-D-coder/implicit-hie-cradle + tag: 7de3cca59975db0e8a4280785b38d542a4a35c7a + tests: true documentation: true diff --git a/exe/Main.hs b/exe/Main.hs index 6a2ec8c3e38..f4e2fbe39ec 100644 --- a/exe/Main.hs +++ b/exe/Main.hs @@ -60,6 +60,7 @@ import GHC.Check ( VersionCheck(..), makeGhcVersi import HIE.Bios.Cradle import HIE.Bios.Environment (addCmdOpts, makeDynFlagsAbsolute) import HIE.Bios.Types +import Hie.Implicit.Cradle import HscTypes (HscEnv(..), ic_dflags) import qualified Language.Haskell.LSP.Core as LSP import Ide.Logger @@ -443,7 +444,7 @@ loadSession dir = do -- throwing an async exception void $ forkIO $ do putStrLn $ "Consulting the cradle for " <> show file - cradle <- maybe (loadImplicitCradle $ addTrailingPathSeparator dir) loadCradle hieYaml + cradle <- maybe (loadImplicitHieCradle $ addTrailingPathSeparator dir) loadCradle hieYaml eopts <- cradleToSessionOpts cradle cfp print eopts case eopts of diff --git a/haskell-language-server.cabal b/haskell-language-server.cabal index 4bc4e0e50f0..40867127527 100644 --- a/haskell-language-server.cabal +++ b/haskell-language-server.cabal @@ -161,6 +161,7 @@ executable haskell-language-server , hie-bios >= 0.4 , haskell-language-server , hslogger + , implicit-hie-cradle , optparse-applicative , shake >= 0.17.5 , text diff --git a/stack-8.10.1.yaml b/stack-8.10.1.yaml index 2cc5a3a9a05..530330dfcb2 100644 --- a/stack-8.10.1.yaml +++ b/stack-8.10.1.yaml @@ -21,6 +21,11 @@ extra-deps: - optics-core-0.3 - github: wz1000/shake commit: fb3859dca2e54d1bbb2c873e68ed225fa179fbef +- github: Avi-D-coder/implicit-hie-cradle + commit: 7de3cca59975db0e8a4280785b38d542a4a35c7a +- github: mpickering/hie-bios + commit: a852cffb0deb306cd1e1fe02aa50d50c77aeb15d +- implicit-hie-0.1.0.0 - semigroups-0.18.5 - temporary-1.2.1.1 @@ -37,4 +42,4 @@ flags: nix: packages: [ icu libcxx zlib ] -concurrent-tests: false \ No newline at end of file +concurrent-tests: false diff --git a/stack-8.6.4.yaml b/stack-8.6.4.yaml index 44aad13daae..e4715429406 100644 --- a/stack-8.6.4.yaml +++ b/stack-8.6.4.yaml @@ -29,7 +29,6 @@ extra-deps: - haskell-lsp-0.22.0.0 - haskell-lsp-types-0.22.0.0 - haskell-src-exts-1.21.1 -- hie-bios-0.5.0 - hlint-2.2.8 - hoogle-5.0.17.11 - hsimport-0.11.0@rev:2 @@ -48,6 +47,11 @@ extra-deps: # - shake-0.18.5 - github: wz1000/shake commit: fb3859dca2e54d1bbb2c873e68ed225fa179fbef +- github: Avi-D-coder/implicit-hie-cradle + commit: 7de3cca59975db0e8a4280785b38d542a4a35c7a +- github: mpickering/hie-bios + commit: a852cffb0deb306cd1e1fe02aa50d50c77aeb15d +- implicit-hie-0.1.0.0 - syz-0.2.0.0 - tasty-rerun-1.1.17 - temporary-1.2.1.1 diff --git a/stack-8.6.5.yaml b/stack-8.6.5.yaml index 8112ee1950b..98b07a35a30 100644 --- a/stack-8.6.5.yaml +++ b/stack-8.6.5.yaml @@ -24,7 +24,6 @@ extra-deps: - haddock-library-1.8.0 - haskell-lsp-0.22.0.0 - haskell-lsp-types-0.22.0.0 -- hie-bios-0.5.0 - indexed-profunctors-0.1 - lens-4.18 - lsp-test-0.10.3.0 @@ -40,6 +39,11 @@ extra-deps: - semialign-1.1 - github: wz1000/shake commit: fb3859dca2e54d1bbb2c873e68ed225fa179fbef +- github: Avi-D-coder/implicit-hie-cradle + commit: 7de3cca59975db0e8a4280785b38d542a4a35c7a +- github: mpickering/hie-bios + commit: a852cffb0deb306cd1e1fe02aa50d50c77aeb15d +- implicit-hie-0.1.0.0 - tasty-rerun-1.1.17 - temporary-1.2.1.1 - type-equality-1 diff --git a/stack-8.8.2.yaml b/stack-8.8.2.yaml index 390910a08e8..3f0c66f2ef2 100644 --- a/stack-8.8.2.yaml +++ b/stack-8.8.2.yaml @@ -19,7 +19,6 @@ extra-deps: - haskell-lsp-0.22.0.0 - haskell-lsp-types-0.22.0.0 - haskell-src-exts-1.21.1 -- hie-bios-0.5.0 - hlint-2.2.8 - hoogle-5.0.17.11 - hsimport-0.11.0 @@ -31,6 +30,11 @@ extra-deps: - semigroups-0.18.5 - github: wz1000/shake commit: fb3859dca2e54d1bbb2c873e68ed225fa179fbef +- github: Avi-D-coder/implicit-hie-cradle + commit: 7de3cca59975db0e8a4280785b38d542a4a35c7a +- github: mpickering/hie-bios + commit: a852cffb0deb306cd1e1fe02aa50d50c77aeb15d +- implicit-hie-0.1.0.0 - temporary-1.2.1.1 flags: diff --git a/stack-8.8.3.yaml b/stack-8.8.3.yaml index 7ddd544644a..b79b395f0eb 100644 --- a/stack-8.8.3.yaml +++ b/stack-8.8.3.yaml @@ -18,7 +18,6 @@ extra-deps: - haskell-lsp-0.22.0.0 - haskell-lsp-types-0.22.0.0 - haskell-src-exts-1.21.1 -- hie-bios-0.5.0 - hlint-2.2.8 - hoogle-5.0.17.11 - hsimport-0.11.0 @@ -30,6 +29,11 @@ extra-deps: - semigroups-0.18.5 - github: wz1000/shake commit: fb3859dca2e54d1bbb2c873e68ed225fa179fbef +- github: Avi-D-coder/implicit-hie-cradle + commit: 7de3cca59975db0e8a4280785b38d542a4a35c7a +- github: mpickering/hie-bios + commit: a852cffb0deb306cd1e1fe02aa50d50c77aeb15d +- implicit-hie-0.1.0.0 - temporary-1.2.1.1 flags: diff --git a/stack.yaml b/stack.yaml index 814a85fa0d5..20664c12a3a 100644 --- a/stack.yaml +++ b/stack.yaml @@ -24,7 +24,6 @@ extra-deps: - haddock-library-1.8.0 - haskell-lsp-0.22.0.0 - haskell-lsp-types-0.22.0.0 -- hie-bios-0.5.0 - indexed-profunctors-0.1 - lens-4.18 - lsp-test-0.10.3.0 @@ -40,6 +39,11 @@ extra-deps: - semialign-1.1 - github: wz1000/shake commit: fb3859dca2e54d1bbb2c873e68ed225fa179fbef +- github: Avi-D-coder/implicit-hie-cradle + commit: 7de3cca59975db0e8a4280785b38d542a4a35c7a +- github: mpickering/hie-bios + commit: a852cffb0deb306cd1e1fe02aa50d50c77aeb15d +- implicit-hie-0.1.0.0 - tasty-rerun-1.1.17 - temporary-1.2.1.1 - type-equality-1