Skip to content

Implicit hie cradle #186

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ package ghcide

write-ghc-environment-files: never

index-state: 2020-07-01T21:29:04Z
index-state: 2020-07-02T03:49:44Z
3 changes: 2 additions & 1 deletion exe/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ import GHC.Check
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
Expand Down Expand Up @@ -442,7 +443,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 project " <> T.pack (takeBaseName (cradleRootDir cradle))
Expand Down
4 changes: 3 additions & 1 deletion exe/Wrapper.hs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import Data.List
-- import qualified Data.Text.IO as T
-- import Development.IDE.Types.Logger
import HIE.Bios
import Hie.Implicit.Cradle
import Ide.Cradle (findLocalCradle)
import Ide.Logger (logm)
import Ide.Version
Expand Down Expand Up @@ -65,7 +66,8 @@ main = do
logm $ "args:" ++ show args

-- Get the cabal directory from the cradle
cradle <- findLocalCradle (d </> "File.hs")
hieYaml <- findCradle (d </> "File.hs")
cradle <- maybe (loadImplicitHieCradle $ addTrailingPathSeparator d) loadCradle hieYaml
let dir = cradleRootDir cradle
logm $ "Cradle directory:" ++ dir
setCurrentDirectory dir
Expand Down
2 changes: 2 additions & 0 deletions haskell-language-server.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ executable haskell-language-server
, hie-bios >= 0.4
, haskell-language-server
, hslogger
, implicit-hie-cradle
, optparse-applicative
, safe-exceptions
, shake >= 0.17.5
Expand Down Expand Up @@ -204,6 +205,7 @@ executable haskell-language-server-wrapper
, ghc-paths
, hie-bios
, haskell-language-server
, implicit-hie-cradle
, optparse-applicative
, process
default-language: Haskell2010
Expand Down
4 changes: 3 additions & 1 deletion stack-8.10.1.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resolver: nightly-2020-06-15
resolver: nightly-2020-06-29
compiler: ghc-8.10.1

packages:
Expand All @@ -14,6 +14,8 @@ extra-deps:
- clock-0.7.2
- floskell-0.10.3
- ghc-exactprint-0.6.3
- implicit-hie-0.1.1.0
- implicit-hie-cradle-0.1.0.0
- lens-4.19.1
- lsp-test-0.11.0.2
- monad-dijkstra-0.1.1.2
Expand Down
6 changes: 5 additions & 1 deletion stack-8.6.4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,14 @@ 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.5.1
- hlint-2.2.8
- hoogle-5.0.17.11
- hsimport-0.11.0@rev:2
- HsYAML-0.2.1.0@rev:1
- HsYAML-aeson-0.2.0.0@rev:1
- implicit-hie-0.1.1.0
- implicit-hie-cradle-0.1.0.0
- lens-4.18
- lsp-test-0.11.0.2
- microlens-th-0.4.2.3@rev:1
Expand Down Expand Up @@ -63,6 +65,8 @@ extra-deps:
- yaml-0.11.1.2
# To make build work in windows 7
- unix-time-0.4.7
- implicit-hie-0.1.1.0
- implicit-hie-cradle-0.1.0.0


flags:
Expand Down
4 changes: 3 additions & 1 deletion stack-8.6.5.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ 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.5.1
- HsYAML-0.2.1.0@rev:1
- HsYAML-aeson-0.2.0.0@rev:1
- indexed-profunctors-0.1
- implicit-hie-0.1.1.0
- implicit-hie-cradle-0.1.0.0
- lens-4.18
- lsp-test-0.11.0.2
- monad-dijkstra-0.1.1.2
Expand Down
4 changes: 3 additions & 1 deletion stack-8.8.2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@ 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.5.1
- hlint-2.2.8
- hoogle-5.0.17.11
- hsimport-0.11.0
- HsYAML-0.2.1.0@rev:1
- HsYAML-aeson-0.2.0.0@rev:1
- implicit-hie-0.1.1.0
- implicit-hie-cradle-0.1.0.0
- ilist-0.3.1.0
- lsp-test-0.11.0.2
- monad-dijkstra-0.1.1.2
Expand Down
4 changes: 3 additions & 1 deletion stack-8.8.3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ 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.5.1
- hlint-2.2.8
- hoogle-5.0.17.11
- hsimport-0.11.0
- implicit-hie-0.1.1.0
- implicit-hie-cradle-0.1.0.0
- ilist-0.3.1.0
- lsp-test-0.11.0.2
- monad-dijkstra-0.1.1.2
Expand Down
4 changes: 3 additions & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ 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.5.1
- HsYAML-0.2.1.0@rev:1
- HsYAML-aeson-0.2.0.0@rev:1
- implicit-hie-0.1.1.0
- implicit-hie-cradle-0.1.0.0
- indexed-profunctors-0.1
- lens-4.18
- lsp-test-0.11.0.2
Expand Down