diff --git a/.gitmodules b/.gitmodules index a52b36f97a..c64555bbb2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -12,4 +12,5 @@ path = ghcide # url = https://github.com/digital-asset/ghcide.git # url = https://github.com/alanz/ghcide.git - url = https://github.com/wz1000/ghcide.git + # url = https://github.com/wz1000/ghcide.git + url = https://github.com/fendor/ghcide.git diff --git a/cabal.project b/cabal.project index 2bcc2b50f4..0246840a83 100644 --- a/cabal.project +++ b/cabal.project @@ -12,4 +12,4 @@ package ghcide write-ghc-environment-files: never -index-state: 2020-07-01T21:29:04Z +index-state: 2020-07-13T21:29:04Z diff --git a/exe/Main.hs b/exe/Main.hs index 1ab82d914b..a6bbbfb93f 100644 --- a/exe/Main.hs +++ b/exe/Main.hs @@ -600,7 +600,7 @@ setCacheDir logger prefix hscComponents comps dflags = do renderCradleError :: NormalizedFilePath -> CradleError -> FileDiagnostic -renderCradleError nfp (CradleError _ec t) = +renderCradleError nfp (CradleError _ _ec t) = ideErrorWithSource (Just "cradle") (Just DsError) nfp (T.unlines (map T.pack t)) -- See Note [Multi Cradle Dependency Info] diff --git a/ghcide b/ghcide index 747ec1401c..8530b98087 160000 --- a/ghcide +++ b/ghcide @@ -1 +1 @@ -Subproject commit 747ec1401c62257ec849319eb2dda966a8008b09 +Subproject commit 8530b980871f9bc4f6fc2e688a4620e5fe1a0340 diff --git a/haskell-language-server.cabal b/haskell-language-server.cabal index 4126741f3d..63212ee42a 100644 --- a/haskell-language-server.cabal +++ b/haskell-language-server.cabal @@ -77,7 +77,7 @@ library , gitrev , hashable , haskell-lsp == 0.22.* - , hie-bios >= 0.4 + , hie-bios ^>= 0.6.1 , hslogger , lens , ormolu ^>= 0.1.2 diff --git a/src/Ide/Cradle.hs b/src/Ide/Cradle.hs index 9211df2453..a2d976d29e 100644 --- a/src/Ide/Cradle.hs +++ b/src/Ide/Cradle.hs @@ -21,7 +21,8 @@ import Distribution.Helper (Package, projectPackages, pUnits, unChModuleName, Ex(..), ProjLoc(..), QueryEnv, mkQueryEnv, runQuery, Unit, unitInfo, uiComponents, - ChEntrypoint(..), UnitInfo(..)) + ChEntrypoint(..), UnitInfo(..), + qePrograms, ghcProgram) import Distribution.Helper.Discover (findProjects, getDefaultDistDir) import Ide.Logger import HIE.Bios as Bios @@ -470,6 +471,7 @@ cabalHelperCradle file = do , componentRoot = cwd , componentDependencies = [] } + , runGhcCmd = \args -> Bios.readProcessWithCwd cwd "ghc" args "" } } Just (Ex proj) -> do @@ -497,6 +499,7 @@ cabalHelperCradle file = do , cradleOptsProg = CradleAction { actionName = Bios.Other (projectNoneType proj) , runCradle = \_ _ -> return CradleNone + , runGhcCmd = \_ -> pure CradleNone } } Just realPackage -> do @@ -517,6 +520,9 @@ cabalHelperCradle file = do realPackage normalisedPackageLocation fp + , runGhcCmd = \args -> do + let programs = qePrograms env + Bios.readProcessWithCwd normalisedPackageLocation (ghcProgram programs) args "" } } @@ -558,6 +564,7 @@ cabalHelperAction proj env package root fp = do Left err -> return $ CradleFail $ CradleError + [] (ExitFailure 2) err diff --git a/stack-8.10.1.yaml b/stack-8.10.1.yaml index 820bc7aa69..73b0855aff 100644 --- a/stack-8.10.1.yaml +++ b/stack-8.10.1.yaml @@ -7,6 +7,7 @@ packages: extra-deps: - Cabal-3.0.2.0 # - cabal-helper-1.1.0.0 +- hie-bios-0.6.1 - github: DanielG/cabal-helper commit: 79a5608778493bf32e74b54bbf1ea2729941e50f - cabal-plan-0.7.0.0 diff --git a/stack-8.6.4.yaml b/stack-8.6.4.yaml index 4927138227..4f0ddab00b 100644 --- a/stack-8.6.4.yaml +++ b/stack-8.6.4.yaml @@ -30,7 +30,9 @@ 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 +- hie-bios-0.6.1 +- github: mpickering/hie-bios + commit: b925bbfacf4f42898733d696b62a829258cd9cf9 - hlint-2.2.8 - hoogle-5.0.17.11 - hsimport-0.11.0@rev:2 @@ -49,8 +51,6 @@ extra-deps: - regex-tdfa-1.3.1.0 - rope-utf16-splay-0.3.1.0 - shake-0.19.1 -# - github: wz1000/shake -# commit: fb3859dca2e54d1bbb2c873e68ed225fa179fbef - strict-list-0.1.5 - stylish-haskell-0.11.0.0 - syz-0.2.0.0 diff --git a/stack-8.6.5.yaml b/stack-8.6.5.yaml index 1de555ca31..2a6f9298e7 100644 --- a/stack-8.6.5.yaml +++ b/stack-8.6.5.yaml @@ -24,7 +24,7 @@ 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 +- hie-bios-0.6.1 - HsYAML-0.2.1.0@rev:1 - HsYAML-aeson-0.2.0.0@rev:1 - indexed-profunctors-0.1 diff --git a/stack-8.8.2.yaml b/stack-8.8.2.yaml index 482bf80863..af8599e938 100644 --- a/stack-8.8.2.yaml +++ b/stack-8.8.2.yaml @@ -22,7 +22,7 @@ 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 +- hie-bios-0.6.1 - hlint-2.2.8 - hoogle-5.0.17.11 - hsimport-0.11.0 diff --git a/stack-8.8.3.yaml b/stack-8.8.3.yaml index c019cf33c3..7f8fe524ba 100644 --- a/stack-8.8.3.yaml +++ b/stack-8.8.3.yaml @@ -20,7 +20,7 @@ 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 +- hie-bios-0.6.1 - hlint-2.2.8 - hoogle-5.0.17.11 - hsimport-0.11.0 diff --git a/stack.yaml b/stack.yaml index 1de555ca31..88eb9f5d82 100644 --- a/stack.yaml +++ b/stack.yaml @@ -24,7 +24,7 @@ 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 +- hie-bios-0.6.1 - HsYAML-0.2.1.0@rev:1 - HsYAML-aeson-0.2.0.0@rev:1 - indexed-profunctors-0.1 @@ -40,8 +40,6 @@ extra-deps: - regex-pcre-builtin-0.95.1.1.8.43 - regex-tdfa-1.3.1.0 - semialign-1.1 -# - github: wz1000/shake -# commit: fb3859dca2e54d1bbb2c873e68ed225fa179fbef - stylish-haskell-0.11.0.0 - tasty-rerun-1.1.17 - temporary-1.2.1.1