Skip to content
This repository has been archived by the owner on Jan 2, 2021. It is now read-only.

Use implicit-hie when no explicit hie.yaml #782

Merged
merged 4 commits into from
Sep 13, 2020
Merged
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
8 changes: 4 additions & 4 deletions .azure/windows-stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
5 changes: 1 addition & 4 deletions ghcide.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Comment on lines -204 to -207
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why has this been removed?

Copy link
Member Author

@jneira jneira Sep 11, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for nor mentioning it, my local windows build was failing due to a segfault in the external interpreter (the thing that line try to fix in ci!)
The ci job has failied for other reason, let's see if it continue failing due to segfault without -fexternal-interpreter after fixin the actual error.
//cc @bubba


executable ghcide-test-preprocessor
default-language: Haskell2010
Expand Down
3 changes: 2 additions & 1 deletion session-loader/Development/IDE/Session.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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))
Expand Down
4 changes: 4 additions & 0 deletions stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -16,6 +19,7 @@ extra-deps:
- tasty-rerun-1.1.17
- ghc-check-0.5.0.1
- extra-1.7.2

nix:
packages: [zlib]

Expand Down
3 changes: 3 additions & 0 deletions stack810.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
5 changes: 4 additions & 1 deletion stack8101.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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]
Expand Down
3 changes: 3 additions & 0 deletions stack84.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions stack88.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down