Skip to content

Commit 5bd8512

Browse files
jneiraAilrun
andauthored
Update ghc-9.0.1 support (#2131)
* Update ghc-9.0.1 support * Use hie-bios master for stack * Enable rest of available plugins * Clean cabal allow-newer * Disable class plugin * Use void as suggested by hlint * Use hackage versions * Disable refineImports plugin * Comment out refineImports and use hackage released versions for blaze-textual and hie-bios * Use extra < 1.7.10 Co-authored-by: Junyoung "Clare" Jang <[email protected]>
1 parent a800b9d commit 5bd8512

File tree

4 files changed

+42
-97
lines changed

4 files changed

+42
-97
lines changed

cabal-ghc901.project

Lines changed: 10 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ packages:
1010
-- ./plugins/hls-brittany-plugin
1111
-- ./plugins/hls-stylish-haskell-plugin
1212
-- ./plugins/hls-fourmolu-plugin
13-
./plugins/hls-class-plugin
13+
-- ./plugins/hls-class-plugin
1414
./plugins/hls-eval-plugin
1515
./plugins/hls-explicit-imports-plugin
16-
./plugins/hls-refine-imports-plugin
16+
-- ./plugins/hls-refine-imports-plugin
1717
./plugins/hls-hlint-plugin
1818
./plugins/hls-rename-plugin
1919
./plugins/hls-retrie-plugin
@@ -24,31 +24,21 @@ packages:
2424
./plugins/hls-module-name-plugin
2525
./plugins/hls-ormolu-plugin
2626
./plugins/hls-call-hierarchy-plugin
27+
28+
with-compiler: ghc-9.0.1
29+
2730
tests: true
2831

2932
package *
3033
ghc-options: -haddock
3134
test-show-details: direct
3235

33-
source-repository-package
34-
type: git
35-
location: https://github.com/jwaldmann/blaze-textual.git
36-
tag: d8ee6cf80e27f9619d621c936bb4bda4b99a183f
37-
-- https://github.com/jwaldmann/blaze-textual/commit/d8ee6cf80e27f9619d621c936bb4bda4b99a183f
38-
-- https://github.com/bos/blaze-textual/issues/13
39-
4036
source-repository-package
4137
type: git
4238
location: https://github.com/mithrandi/czipwith.git
4339
tag: b6245884ae83e00dd2b5261762549b37390179f8
4440
-- https://github.com/lspitzner/czipwith/pull/2
4541

46-
source-repository-package
47-
type: git
48-
location: https://github.com/jneira/hie-bios/
49-
tag: 9b1445ab5efcabfad54043fc9b8e50e9d8c5bbf3
50-
-- https://github.com/mpickering/hie-bios/pull/285
51-
5242
source-repository-package
5343
type: git
5444
location: https://github.com/hsyl20/ghc-api-compat
@@ -76,56 +66,15 @@ source-repository-package
7666

7767
write-ghc-environment-files: never
7868

79-
index-state: 2021-08-08T02:21:16Z
69+
index-state: 2021-08-30T20:52:40Z
8070

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

85-
8675
allow-newer:
87-
-- -- Broken on ghc9, but let's pretend it's not so we can build the other things
88-
-- brittany:base,
89-
-- brittany:ghc,
90-
-- brittany:ghc-boot-th,
91-
-- butcher:base,
92-
-- fourmolu:ghc-lib-parser,
93-
-- stylish-haskell:ghc-lib-parser,
94-
-- stylish-haskell:Cabal,
95-
-- multistate:base,
96-
-- ghc-source-gen:ghc,
97-
98-
assoc:base,
99-
cryptohash-md5:base,
100-
cryptohash-sha1:base,
101-
constraints-extras:template-haskell,
102-
data-tree-print:base,
103-
deepseq:base,
104-
dependent-sum:some,
105-
dependent-sum:constraints,
106-
diagrams-postscript:base,
107-
diagrams-postscript:lens,
108-
diagrams-postscript:diagrams-core,
109-
diagrams-postscript:monoid-extras,
110-
diagrams:diagrams-core,
111-
Chart-diagrams:diagrams-core,
112-
SVGFonts:diagrams-core,
113-
dual-tree:base,
114-
-- Does this make any sense?
115-
entropy:Cabal,
116-
force-layout:base,
117-
force-layout:lens,
118-
floskell:ghc-prim,
11976
floskell:base,
120-
hashable:base,
121-
hslogger:base,
122-
monoid-extras:base,
123-
newtype-generics:base,
124-
parallel:base,
125-
regex-base:base,
126-
regex-tdfa:base,
127-
statestack:base,
128-
svg-builder:base,
129-
these:base,
130-
time-compat:base
131-
77+
floskell:ghc-prim,
78+
-- for shake-bench
79+
Chart-diagrams:diagrams-core,
80+
SVGFonts:diagrams-core

ghcide/ghcide.cabal

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ library
4848
dependent-map,
4949
dependent-sum,
5050
dlist,
51-
extra >= 1.7.4,
51+
-- we can't use >= 1.7.10 while we have to use hlint == 3.2.*
52+
extra >= 1.7.4 && < 1.7.10,
5253
fuzzy,
5354
filepath,
5455
fingertree,
@@ -100,7 +101,7 @@ library
100101
ghc-paths,
101102
ghc-api-compat,
102103
cryptohash-sha1 >=0.11.100 && <0.12,
103-
hie-bios >= 0.7.1 && < 0.8.0,
104+
hie-bios >= 0.7.1 && < 0.9.0,
104105
implicit-hie-cradle >= 0.3.0.5 && < 0.4,
105106
base16-bytestring >=0.1.1 && <1.1
106107
if os(windows)

ghcide/src/Development/IDE/Core/FileStore.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ typecheckParentsAction nfp = do
289289
Just rs -> do
290290
liftIO $ (log $ "Typechecking reverse dependencies for " ++ show nfp ++ ": " ++ show revs)
291291
`catch` \(e :: SomeException) -> log (show e)
292-
() <$ uses GetModIface rs
292+
void $ uses GetModIface rs
293293

294294
-- | Note that some keys have been modified and restart the session
295295
-- Only valid if the virtual file system was initialised by LSP, as that

stack-9.0.1.yaml

Lines changed: 28 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
resolver: nightly-2021-05-02
2-
compiler: ghc-9.0.1
1+
resolver: nightly-2021-08-26
32

43
packages:
54
- .
@@ -8,7 +7,7 @@ packages:
87
- ./ghcide/
98
- ./hls-plugin-api
109
- ./hls-test-utils
11-
# - ./shake-bench
10+
- ./shake-bench
1211
- ./plugins/hls-call-hierarchy-plugin
1312
# - ./plugins/hls-class-plugin
1413
- ./plugins/hls-haddock-comments-plugin
@@ -22,58 +21,44 @@ packages:
2221
# - ./plugins/hls-tactics-plugin
2322
# - ./plugins/hls-brittany-plugin
2423
# - ./plugins/hls-stylish-haskell-plugin
25-
# - ./plugins/hls-floskell-plugin
24+
- ./plugins/hls-floskell-plugin
2625
# - ./plugins/hls-fourmolu-plugin
2726
- ./plugins/hls-pragmas-plugin
2827
- ./plugins/hls-module-name-plugin
29-
# - ./plugins/hls-ormolu-plugin
28+
- ./plugins/hls-ormolu-plugin
3029

3130
ghc-options:
3231
"$everything": -haddock
3332

3433
extra-deps:
35-
- apply-refact-0.9.3.0
36-
- base16-bytestring-0.1.1.7@sha256:0021256a9628971c08da95cb8f4d0d72192f3bb8a7b30b55c080562d17c43dd3,2231
34+
35+
- blaze-textual-0.2.2.1
3736
- bytestring-encoding-0.1.0.0@sha256:460b49779fbf0112e8e2f1753c1ed9131eb18827600c298f4d6bb51c4e8c1c0d,1727
38-
# Not newest (constraints-extras doesn't support 0.13 yet)
39-
- constraints-0.12@sha256:71c7999d7fa01d8941f08d37d4c107c6b1bcbd0306e234157557b9b096b7f1be,2217
40-
- constraints-extras-0.3.1.0@sha256:12016ebb91ad5ed2c82bf7e48c6bd6947d164d33c9dca5ac3965de1bb6c780c0,1777
4137
- dependent-map-0.4.0.0@sha256:ca2b131046f4340a1c35d138c5a003fe4a5be96b14efc26291ed35fd08c62221,1657
4238
- dependent-sum-0.7.1.0@sha256:0e419237f5b86da3659772afff9cab355c0f8d5b3fdb15a5b30e673d8dc83941,2147
43-
- ghc-lib-9.0.1.20210324@sha256:c8b9a2541ea3424c8d0e4f80584477d0f35be03f4a47d931152042d5f446c5fc,19279
44-
- ghc-lib-parser-9.0.1.20210324@sha256:fb680f78d4ab08b5d089a05bda3b84ad857e5edcc2e4ca7c188c0207d369af80
45-
- ghc-lib-parser-ex-9.0.0.4@sha256:8282b11c3797fc8ba225b245e736cc9a0745d9c48d0f9fea7f9bffb5c9997709,3642
39+
- floskell-0.10.5
4640
- ghc-source-gen-0.4.1.0
47-
- haddock-library-1.10.0@sha256:2a6c239da9225951a5d837e1ce373faeeae60d1345c78dd0a0b0f29df30c4fe9,4098
4841
- heapsize-0.3.0.1@sha256:0b69aa97a46d819b700ac7b145f3b5493c3565cf2c5b8298682238d405d0326e,1417
42+
- hie-bios-0.7.6
4943
- hiedb-0.4.0.0
50-
- hlint-3.3@sha256:4218ad6e03050f5d68aeba0e025f5f05e366c8fd49657f2a19df04ee31b2bb23,4154
44+
- hspec-2.7.10
45+
- hspec-core-2.7.10
46+
- hspec-discover-2.7.10
5147
- implicit-hie-0.1.2.6
5248
- implicit-hie-cradle-0.3.0.5
53-
- lens-5.0.1
54-
- profunctors-5.6.2
49+
- monad-dijkstra-0.1.1.2
5550
- refinery-0.4.0.0
5651
- retrie-1.0.0.0
57-
- some-1.0.2@sha256:3d460998df32ad7b93bf55657aeae988d97070155e71718b4bc75d0997ce9d62,2244
52+
- some-1.0.2
5853
- lsp-1.2.0.1
5954
- lsp-types-1.3.0.1
6055
- lsp-test-0.14.0.1
61-
62-
# Upstream patches for ghc-9.0.1 compatability
63-
# Same as in cabal.project
64-
- github: jwaldmann/blaze-textual
65-
commit: d8ee6cf80e27f9619d621c936bb4bda4b99a183f
66-
# https://github.com/jwaldmann/blaze-textual/commit/d8ee6cf80e27f9619d621c936bb4bda4b99a183f
67-
# https://github.com/bos/blaze-textual/issues/13
56+
- sqlite-simple-0.4.18.0
6857

6958
- github: mithrandi/czipwith
7059
commit: b6245884ae83e00dd2b5261762549b37390179f8
7160
# https://github.com/lspitzner/czipwith/pull/2
7261

73-
- github: jneira/hie-bios
74-
commit: 9b1445ab5efcabfad54043fc9b8e50e9d8c5bbf3
75-
# https://github.com/mpickering/hie-bios/pull/285
76-
7762
- github: hsyl20/ghc-api-compat
7863
commit: 8fee87eac97a538dbe81ff1ab18cff10f2f9fa15
7964

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

76+
# shake-bench dependencies
77+
78+
- SVGFonts-1.7.0.1@sha256:44f0e5ee69a0c41de72bfc1408d1384719ec44b2f1a83fd4da31071d9da21f84,4004
79+
- diagrams-postscript-1.5@sha256:ea9ef970f653072cfde9715fad92481eedcc72a94da543c52a68ca33100902ab,2369
80+
- Chart-1.9.3@sha256:640a38463318b070d80a049577e4f0b3322df98290abb7afcf0cb74a4ad5b512,2948
81+
- Chart-diagrams-1.9.3@sha256:1535d5d0d3febca63138cecfde234315212611c21bb7f4358b2dae8c55c59003,1801
82+
- statestack-0.3@sha256:be43ce2cd790a4732b88cdc9480458503cb5e307b4f79a502d99d5b3d417730e,1135
83+
9184
- github: diagrams/active
9285
commit: ca23431a8dfa013992f9164ccc882a3277361f17
9386
# https://github.com/diagrams/active/pull/36
9487

95-
96-
# benchmark dependency
9788
- github: HeinrichApfelmus/operational
9889
commit: 16e19aaf34e286f3d27b3988c61040823ec66537
9990

91+
# end of shake-bench dpendencies
92+
93+
# due to floskell-0.10.5 and diagrams-core-1.5.0
94+
allow-newer: true
95+
10096
configure-options:
10197
ghcide:
10298
- --disable-library-for-ghci
@@ -108,13 +104,12 @@ configure-options:
108104
flags:
109105
haskell-language-server:
110106
pedantic: true
107+
111108
class: false
112109
splice: false
113110
refineImports: false
114111
tactic: false # Dependencies fail
115112

116-
floskell: false
117-
ormolu: false
118113
fourmolu: false
119114
stylishHaskell: false
120115
brittany: false

0 commit comments

Comments
 (0)