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

[#518] Build ghcide with GHC 8.10.1 #519

Merged
merged 15 commits into from
May 11, 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
2 changes: 2 additions & 0 deletions .azure/linux-stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ jobs:
vmImage: 'ubuntu-latest'
strategy:
matrix:
stack_810:
STACK_YAML: "stack810.yaml"
stack_88:
STACK_YAML: "stack88.yaml"
stack_86:
Expand Down
2 changes: 2 additions & 0 deletions .azure/windows-stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ jobs:
vmImage: 'windows-2019'
strategy:
matrix:
stack_810:
STACK_YAML: "stack810.yaml"
stack_88:
STACK_YAML: "stack88.yaml"
stack_86:
Expand Down
1 change: 1 addition & 0 deletions .hlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
- Development.IDE.Core.Compile
- Development.IDE.Core.Rules
- Development.IDE.GHC.Compat
- Development.IDE.GHC.Orphans
- Development.IDE.GHC.Util
- Development.IDE.Import.FindImports
- Development.IDE.LSP.Outline
Expand Down
7 changes: 6 additions & 1 deletion ghcide.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,12 @@ library
Development.IDE.Plugin.CodeAction.RuleTypes
Development.IDE.Plugin.Completions.Logic
Development.IDE.Plugin.Completions.Types
if impl(ghc > 8.7) || flag(ghc-lib)
if (impl(ghc > 8.7) && impl(ghc < 8.10)) || flag(ghc-lib)
Copy link
Contributor

Choose a reason for hiding this comment

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

If this is correct, then why do we need the file in tree for 8.8 as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

This file contains the implementation of the mkHieFile function. This function is present in GHC 8.10. And the implementation for GHC-8.8 is based on HIE files from GHC, where the implementation of this function for GHC 8.6 is based on ghcide own reimplementation of HIE files. So there are 3 cases for this function.

Copy link
Collaborator

@pepeiborra pepeiborra Apr 2, 2020

Choose a reason for hiding this comment

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

The version of mkHieFile in GHC 8.8 was unsuitable for ghcide, so we inlined the implementation locally to fix it. After that, @mpickering yourself propagated the fix upstream, which is the reason it happily does not need to be inlined when building against GHC 8.10

EDIT: oh no, it looks like the fix didn't make it into 8.10, and we still need to use the local version. I guess that complicates things a bit ...

hs-source-dirs: src-ghc88
other-modules:
Development.IDE.GHC.HieAst
if (impl(ghc > 8.9))
hs-source-dirs: src-ghc810
other-modules:
Development.IDE.GHC.HieAst
ghc-options: -Wall -Wno-name-shadowing
Expand Down
Loading