Skip to content

Commit 38d9bd0

Browse files
committed
Upgrade to hie-bios 0.6.1
1 parent a91ca75 commit 38d9bd0

12 files changed

+24
-16
lines changed

.gitmodules

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@
1212
path = ghcide
1313
# url = https://github.com/digital-asset/ghcide.git
1414
# url = https://github.com/alanz/ghcide.git
15-
url = https://github.com/wz1000/ghcide.git
15+
# url = https://github.com/wz1000/ghcide.git
16+
url = https://github.com/fendor/ghcide.git

cabal.project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ package ghcide
1212

1313
write-ghc-environment-files: never
1414

15-
index-state: 2020-07-01T21:29:04Z
15+
index-state: 2020-07-13T21:29:04Z

exe/Main.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ setCacheDir logger prefix hscComponents comps dflags = do
600600

601601

602602
renderCradleError :: NormalizedFilePath -> CradleError -> FileDiagnostic
603-
renderCradleError nfp (CradleError _ec t) =
603+
renderCradleError nfp (CradleError _ _ec t) =
604604
ideErrorWithSource (Just "cradle") (Just DsError) nfp (T.unlines (map T.pack t))
605605

606606
-- See Note [Multi Cradle Dependency Info]

haskell-language-server.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ library
7777
, gitrev
7878
, hashable
7979
, haskell-lsp == 0.22.*
80-
, hie-bios >= 0.4
80+
, hie-bios ^>= 0.6.1
8181
, hslogger
8282
, lens
8383
, ormolu ^>= 0.1.2

src/Ide/Cradle.hs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
module Ide.Cradle where
77

8+
import Control.Applicative (optional)
89
import Control.Exception
910
import Data.Foldable (toList)
1011
import Data.Function ((&))
@@ -21,7 +22,8 @@ import Distribution.Helper (Package, projectPackages, pUnits,
2122
unChModuleName, Ex(..), ProjLoc(..),
2223
QueryEnv, mkQueryEnv, runQuery,
2324
Unit, unitInfo, uiComponents,
24-
ChEntrypoint(..), UnitInfo(..))
25+
ChEntrypoint(..), UnitInfo(..),
26+
qePrograms, ghcProgram)
2527
import Distribution.Helper.Discover (findProjects, getDefaultDistDir)
2628
import Ide.Logger
2729
import HIE.Bios as Bios
@@ -31,7 +33,7 @@ import qualified HIE.Bios.Types as Bios
3133
import System.Directory (getCurrentDirectory, canonicalizePath, findExecutable)
3234
import System.Exit
3335
import System.FilePath
34-
import System.Process (readCreateProcessWithExitCode, shell, CreateProcess(..))
36+
import System.Process (readCreateProcessWithExitCode, shell, CreateProcess(..), proc)
3537

3638

3739
-- ---------------------------------------------------------------------
@@ -470,6 +472,7 @@ cabalHelperCradle file = do
470472
, componentRoot = cwd
471473
, componentDependencies = []
472474
}
475+
, runGhcCmd = \args -> Bios.readProcessWithCwd cwd "ghc" args ""
473476
}
474477
}
475478
Just (Ex proj) -> do
@@ -497,6 +500,7 @@ cabalHelperCradle file = do
497500
, cradleOptsProg =
498501
CradleAction { actionName = Bios.Other (projectNoneType proj)
499502
, runCradle = \_ _ -> return CradleNone
503+
, runGhcCmd = \_ -> pure CradleNone
500504
}
501505
}
502506
Just realPackage -> do
@@ -517,6 +521,9 @@ cabalHelperCradle file = do
517521
realPackage
518522
normalisedPackageLocation
519523
fp
524+
, runGhcCmd = \args -> do
525+
let programs = qePrograms env
526+
Bios.readProcessWithCwd normalisedPackageLocation (ghcProgram programs) args ""
520527
}
521528
}
522529

@@ -558,6 +565,7 @@ cabalHelperAction proj env package root fp = do
558565
Left err -> return
559566
$ CradleFail
560567
$ CradleError
568+
[]
561569
(ExitFailure 2)
562570
err
563571

stack-8.10.1.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ packages:
77
extra-deps:
88
- Cabal-3.0.2.0
99
# - cabal-helper-1.1.0.0
10+
- hie-bios-0.6.1
1011
- github: DanielG/cabal-helper
1112
commit: 79a5608778493bf32e74b54bbf1ea2729941e50f
1213
- cabal-plan-0.7.0.0

stack-8.6.4.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ extra-deps:
3030
- haskell-lsp-0.22.0.0
3131
- haskell-lsp-types-0.22.0.0
3232
- haskell-src-exts-1.21.1
33-
- hie-bios-0.5.0
33+
- hie-bios-0.6.1
34+
- github: mpickering/hie-bios
35+
commit: b925bbfacf4f42898733d696b62a829258cd9cf9
3436
- hlint-2.2.8
3537
- hoogle-5.0.17.11
3638
- hsimport-0.11.0@rev:2
@@ -49,8 +51,6 @@ extra-deps:
4951
- regex-tdfa-1.3.1.0
5052
- rope-utf16-splay-0.3.1.0
5153
- shake-0.19.1
52-
# - github: wz1000/shake
53-
# commit: fb3859dca2e54d1bbb2c873e68ed225fa179fbef
5454
- strict-list-0.1.5
5555
- stylish-haskell-0.11.0.0
5656
- syz-0.2.0.0

stack-8.6.5.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ extra-deps:
2424
- haddock-library-1.8.0
2525
- haskell-lsp-0.22.0.0
2626
- haskell-lsp-types-0.22.0.0
27-
- hie-bios-0.5.0
27+
- hie-bios-0.6.1
2828
- HsYAML-0.2.1.0@rev:1
2929
- HsYAML-aeson-0.2.0.0@rev:1
3030
- indexed-profunctors-0.1

stack-8.8.2.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ extra-deps:
2222
- haskell-lsp-0.22.0.0
2323
- haskell-lsp-types-0.22.0.0
2424
- haskell-src-exts-1.21.1
25-
- hie-bios-0.5.0
25+
- hie-bios-0.6.1
2626
- hlint-2.2.8
2727
- hoogle-5.0.17.11
2828
- hsimport-0.11.0

stack-8.8.3.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ extra-deps:
2020
- haskell-lsp-0.22.0.0
2121
- haskell-lsp-types-0.22.0.0
2222
- haskell-src-exts-1.21.1
23-
- hie-bios-0.5.0
23+
- hie-bios-0.6.1
2424
- hlint-2.2.8
2525
- hoogle-5.0.17.11
2626
- hsimport-0.11.0

stack.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ extra-deps:
2424
- haddock-library-1.8.0
2525
- haskell-lsp-0.22.0.0
2626
- haskell-lsp-types-0.22.0.0
27-
- hie-bios-0.5.0
27+
- hie-bios-0.6.1
2828
- HsYAML-0.2.1.0@rev:1
2929
- HsYAML-aeson-0.2.0.0@rev:1
3030
- indexed-profunctors-0.1
@@ -40,8 +40,6 @@ extra-deps:
4040
- regex-pcre-builtin-0.95.1.1.8.43
4141
- regex-tdfa-1.3.1.0
4242
- semialign-1.1
43-
# - github: wz1000/shake
44-
# commit: fb3859dca2e54d1bbb2c873e68ed225fa179fbef
4543
- stylish-haskell-0.11.0.0
4644
- tasty-rerun-1.1.17
4745
- temporary-1.2.1.1

0 commit comments

Comments
 (0)