Skip to content

Update ghc-9.0.1 support #2131

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

Merged
merged 12 commits into from
Sep 1, 2021
71 changes: 10 additions & 61 deletions cabal-ghc901.project
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ packages:
-- ./plugins/hls-brittany-plugin
-- ./plugins/hls-stylish-haskell-plugin
-- ./plugins/hls-fourmolu-plugin
./plugins/hls-class-plugin
-- ./plugins/hls-class-plugin
./plugins/hls-eval-plugin
./plugins/hls-explicit-imports-plugin
./plugins/hls-refine-imports-plugin
-- ./plugins/hls-refine-imports-plugin
./plugins/hls-hlint-plugin
./plugins/hls-rename-plugin
./plugins/hls-retrie-plugin
Expand All @@ -24,31 +24,21 @@ packages:
./plugins/hls-module-name-plugin
./plugins/hls-ormolu-plugin
./plugins/hls-call-hierarchy-plugin

with-compiler: ghc-9.0.1

Comment on lines +27 to +29
Copy link
Collaborator

Choose a reason for hiding this comment

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

what does this do?

Copy link
Member Author

Choose a reason for hiding this comment

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

It is the equivalent to do -w ghc-9.0.1 or --with-compiler ghc-9.0.1, make the build use that compiler executable

tests: true

package *
ghc-options: -haddock
test-show-details: direct

source-repository-package
type: git
location: https://github.com/jwaldmann/blaze-textual.git
tag: d8ee6cf80e27f9619d621c936bb4bda4b99a183f
-- https://github.com/jwaldmann/blaze-textual/commit/d8ee6cf80e27f9619d621c936bb4bda4b99a183f
-- https://github.com/bos/blaze-textual/issues/13

source-repository-package
type: git
location: https://github.com/mithrandi/czipwith.git
tag: b6245884ae83e00dd2b5261762549b37390179f8
-- https://github.com/lspitzner/czipwith/pull/2

source-repository-package
type: git
location: https://github.com/jneira/hie-bios/
tag: 9b1445ab5efcabfad54043fc9b8e50e9d8c5bbf3
-- https://github.com/mpickering/hie-bios/pull/285

source-repository-package
type: git
location: https://github.com/hsyl20/ghc-api-compat
Expand Down Expand Up @@ -76,56 +66,15 @@ source-repository-package

write-ghc-environment-files: never

index-state: 2021-08-08T02:21:16Z
index-state: 2021-08-30T20:52:40Z

constraints:
-- These plugins doesn't work on GHC9 yet
haskell-language-server -brittany -class -fourmolu -splice -stylishhaskell -tactic -refineImports


allow-newer:
-- -- Broken on ghc9, but let's pretend it's not so we can build the other things
-- brittany:base,
-- brittany:ghc,
-- brittany:ghc-boot-th,
-- butcher:base,
-- fourmolu:ghc-lib-parser,
-- stylish-haskell:ghc-lib-parser,
-- stylish-haskell:Cabal,
-- multistate:base,
-- ghc-source-gen:ghc,

assoc:base,
cryptohash-md5:base,
cryptohash-sha1:base,
constraints-extras:template-haskell,
data-tree-print:base,
deepseq:base,
dependent-sum:some,
dependent-sum:constraints,
diagrams-postscript:base,
diagrams-postscript:lens,
diagrams-postscript:diagrams-core,
diagrams-postscript:monoid-extras,
diagrams:diagrams-core,
Chart-diagrams:diagrams-core,
SVGFonts:diagrams-core,
dual-tree:base,
-- Does this make any sense?
entropy:Cabal,
force-layout:base,
force-layout:lens,
floskell:ghc-prim,
floskell:base,
hashable:base,
hslogger:base,
monoid-extras:base,
newtype-generics:base,
parallel:base,
regex-base:base,
regex-tdfa:base,
statestack:base,
svg-builder:base,
these:base,
time-compat:base

floskell:ghc-prim,
-- for shake-bench
Chart-diagrams:diagrams-core,
SVGFonts:diagrams-core
5 changes: 3 additions & 2 deletions ghcide/ghcide.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ library
dependent-map,
dependent-sum,
dlist,
extra >= 1.7.4,
-- we can't use >= 1.7.10 while we have to use hlint == 3.2.*
extra >= 1.7.4 && < 1.7.10,
fuzzy,
filepath,
fingertree,
Expand Down Expand Up @@ -100,7 +101,7 @@ library
ghc-paths,
ghc-api-compat,
cryptohash-sha1 >=0.11.100 && <0.12,
hie-bios >= 0.7.1 && < 0.8.0,
hie-bios >= 0.7.1 && < 0.9.0,
implicit-hie-cradle >= 0.3.0.5 && < 0.4,
base16-bytestring >=0.1.1 && <1.1
if os(windows)
Expand Down
2 changes: 1 addition & 1 deletion ghcide/src/Development/IDE/Core/FileStore.hs
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ typecheckParentsAction nfp = do
Just rs -> do
liftIO $ (log $ "Typechecking reverse dependencies for " ++ show nfp ++ ": " ++ show revs)
`catch` \(e :: SomeException) -> log (show e)
() <$ uses GetModIface rs
void $ uses GetModIface rs

-- | Note that some keys have been modified and restart the session
-- Only valid if the virtual file system was initialised by LSP, as that
Expand Down
61 changes: 28 additions & 33 deletions stack-9.0.1.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
resolver: nightly-2021-05-02
compiler: ghc-9.0.1
resolver: nightly-2021-08-26

packages:
- .
Expand All @@ -8,7 +7,7 @@ packages:
- ./ghcide/
- ./hls-plugin-api
- ./hls-test-utils
# - ./shake-bench
- ./shake-bench
- ./plugins/hls-call-hierarchy-plugin
# - ./plugins/hls-class-plugin
- ./plugins/hls-haddock-comments-plugin
Expand All @@ -22,58 +21,44 @@ packages:
# - ./plugins/hls-tactics-plugin
# - ./plugins/hls-brittany-plugin
# - ./plugins/hls-stylish-haskell-plugin
# - ./plugins/hls-floskell-plugin
- ./plugins/hls-floskell-plugin
# - ./plugins/hls-fourmolu-plugin
- ./plugins/hls-pragmas-plugin
- ./plugins/hls-module-name-plugin
# - ./plugins/hls-ormolu-plugin
- ./plugins/hls-ormolu-plugin

ghc-options:
"$everything": -haddock

extra-deps:
- apply-refact-0.9.3.0
- base16-bytestring-0.1.1.7@sha256:0021256a9628971c08da95cb8f4d0d72192f3bb8a7b30b55c080562d17c43dd3,2231

- blaze-textual-0.2.2.1
- bytestring-encoding-0.1.0.0@sha256:460b49779fbf0112e8e2f1753c1ed9131eb18827600c298f4d6bb51c4e8c1c0d,1727
# Not newest (constraints-extras doesn't support 0.13 yet)
- constraints-0.12@sha256:71c7999d7fa01d8941f08d37d4c107c6b1bcbd0306e234157557b9b096b7f1be,2217
- constraints-extras-0.3.1.0@sha256:12016ebb91ad5ed2c82bf7e48c6bd6947d164d33c9dca5ac3965de1bb6c780c0,1777
- dependent-map-0.4.0.0@sha256:ca2b131046f4340a1c35d138c5a003fe4a5be96b14efc26291ed35fd08c62221,1657
- dependent-sum-0.7.1.0@sha256:0e419237f5b86da3659772afff9cab355c0f8d5b3fdb15a5b30e673d8dc83941,2147
- ghc-lib-9.0.1.20210324@sha256:c8b9a2541ea3424c8d0e4f80584477d0f35be03f4a47d931152042d5f446c5fc,19279
- ghc-lib-parser-9.0.1.20210324@sha256:fb680f78d4ab08b5d089a05bda3b84ad857e5edcc2e4ca7c188c0207d369af80
- ghc-lib-parser-ex-9.0.0.4@sha256:8282b11c3797fc8ba225b245e736cc9a0745d9c48d0f9fea7f9bffb5c9997709,3642
- floskell-0.10.5
- ghc-source-gen-0.4.1.0
- haddock-library-1.10.0@sha256:2a6c239da9225951a5d837e1ce373faeeae60d1345c78dd0a0b0f29df30c4fe9,4098
- heapsize-0.3.0.1@sha256:0b69aa97a46d819b700ac7b145f3b5493c3565cf2c5b8298682238d405d0326e,1417
- hie-bios-0.7.6
- hiedb-0.4.0.0
- hlint-3.3@sha256:4218ad6e03050f5d68aeba0e025f5f05e366c8fd49657f2a19df04ee31b2bb23,4154
- hspec-2.7.10
- hspec-core-2.7.10
- hspec-discover-2.7.10
- implicit-hie-0.1.2.6
- implicit-hie-cradle-0.3.0.5
- lens-5.0.1
- profunctors-5.6.2
- monad-dijkstra-0.1.1.2
- refinery-0.4.0.0
- retrie-1.0.0.0
- some-1.0.2@sha256:3d460998df32ad7b93bf55657aeae988d97070155e71718b4bc75d0997ce9d62,2244
- some-1.0.2
- lsp-1.2.0.1
- lsp-types-1.3.0.1
- lsp-test-0.14.0.1

# Upstream patches for ghc-9.0.1 compatability
# Same as in cabal.project
- github: jwaldmann/blaze-textual
commit: d8ee6cf80e27f9619d621c936bb4bda4b99a183f
# https://github.com/jwaldmann/blaze-textual/commit/d8ee6cf80e27f9619d621c936bb4bda4b99a183f
# https://github.com/bos/blaze-textual/issues/13
- sqlite-simple-0.4.18.0

- github: mithrandi/czipwith
commit: b6245884ae83e00dd2b5261762549b37390179f8
# https://github.com/lspitzner/czipwith/pull/2

- github: jneira/hie-bios
commit: 9b1445ab5efcabfad54043fc9b8e50e9d8c5bbf3
# https://github.com/mpickering/hie-bios/pull/285

- github: hsyl20/ghc-api-compat
commit: 8fee87eac97a538dbe81ff1ab18cff10f2f9fa15

Expand All @@ -88,15 +73,26 @@ extra-deps:
- dependent-sum-template
# https://github.com/obsidiansystems/dependent-sum/pull/57

# shake-bench dependencies

- SVGFonts-1.7.0.1@sha256:44f0e5ee69a0c41de72bfc1408d1384719ec44b2f1a83fd4da31071d9da21f84,4004
- diagrams-postscript-1.5@sha256:ea9ef970f653072cfde9715fad92481eedcc72a94da543c52a68ca33100902ab,2369
- Chart-1.9.3@sha256:640a38463318b070d80a049577e4f0b3322df98290abb7afcf0cb74a4ad5b512,2948
- Chart-diagrams-1.9.3@sha256:1535d5d0d3febca63138cecfde234315212611c21bb7f4358b2dae8c55c59003,1801
- statestack-0.3@sha256:be43ce2cd790a4732b88cdc9480458503cb5e307b4f79a502d99d5b3d417730e,1135

- github: diagrams/active
commit: ca23431a8dfa013992f9164ccc882a3277361f17
# https://github.com/diagrams/active/pull/36


# benchmark dependency
- github: HeinrichApfelmus/operational
commit: 16e19aaf34e286f3d27b3988c61040823ec66537

# end of shake-bench dpendencies

# due to floskell-0.10.5 and diagrams-core-1.5.0
allow-newer: true

configure-options:
ghcide:
- --disable-library-for-ghci
Expand All @@ -108,13 +104,12 @@ configure-options:
flags:
haskell-language-server:
pedantic: true

class: false
splice: false
refineImports: false
tactic: false # Dependencies fail

floskell: false
ormolu: false
fourmolu: false
stylishHaskell: false
brittany: false
Expand Down