Skip to content

Commit 667ef4e

Browse files
committed
Add support for ghc-9.0.2
1 parent 2719110 commit 667ef4e

File tree

14 files changed

+215
-28
lines changed

14 files changed

+215
-28
lines changed

.circleci/config.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,11 @@ jobs:
100100
- STACK_FILE: "stack-9.0.1.yaml"
101101
<<: *defaults
102102

103+
ghc-9.0.2:
104+
environment:
105+
- STACK_FILE: "stack-9.0.2.yaml"
106+
<<: *defaults
107+
103108
ghc-default:
104109
environment:
105110
- STACK_FILE: "stack.yaml"
@@ -115,4 +120,5 @@ workflows:
115120
- ghc-8.10.6
116121
- ghc-8.10.7
117122
- ghc-9.0.1
123+
- ghc-9.0.2
118124
- ghc-default

.github/workflows/build.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ jobs:
1919
fail-fast: false
2020
matrix:
2121
ghc:
22-
[ "9.0.1"
22+
[ "9.0.2"
23+
, "9.0.1"
2324
, '8.10.7'
2425
, "8.10.6"
2526
, "8.8.4"
@@ -53,9 +54,14 @@ jobs:
5354
echo -e 'package blaze-textual\n flags: +integer-simple' >> cabal.project.local
5455
fi
5556
56-
- name: (GHC 9.0) Use modified cabal.project for GHC 9.0
57-
if: ${{ matrix.ghc == '9.0.1' }}
58-
run: cp cabal-ghc901.project cabal.project
57+
- name: Use modified cabal.project
58+
env:
59+
GHCVER: ${{ matrix.ghc }}
60+
run: |
61+
ALT_PROJECT_FILE=cabal-ghc${GHCVER//./}.project
62+
if [[ -f "$ALT_PROJECT_FILE" ]]; then
63+
rm -f -v cabal.project && cp -v "$ALT_PROJECT_FILE" cabal.project
64+
fi
5965
6066
- name: Shorten binary names
6167
run: |

.github/workflows/caching.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ jobs:
7676
strategy:
7777
fail-fast: false
7878
matrix:
79-
ghc: [ "9.0.1"
79+
ghc: [ "9.0.2"
80+
, "9.0.1"
8081
, "8.10.7"
8182
, "8.10.6"
8283
, "8.8.4"

.github/workflows/hackage.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,19 @@ jobs:
3434
"hls-call-hierarchy-plugin", "hls-alternate-number-format-plugin",
3535
"hls-qualify-imported-names-plugin",
3636
"haskell-language-server"]
37-
ghc: [ "9.0.1",
38-
"8.10.7",
39-
"8.8.4",
40-
"8.6.5"]
37+
ghc: [ "9.0.2"
38+
, "8.10.7"
39+
, "8.8.4"
40+
, "8.6.5"
41+
]
4142
exclude:
42-
- ghc: "9.0.1"
43+
- ghc: "9.0.2"
4344
package: "hls-brittany-plugin"
44-
- ghc: "9.0.1"
45+
- ghc: "9.0.2"
4546
package: "hls-stylish-haskell-plugin"
46-
- ghc: "9.0.1"
47+
- ghc: "9.0.2"
4748
package: "hls-class-plugin"
48-
- ghc: "9.0.1"
49+
- ghc: "9.0.2"
4950
package: "hls-tactics-plugin"
5051

5152
steps:
@@ -111,7 +112,7 @@ jobs:
111112
echo "allow-newer: Chart-diagrams:diagrams-core, SVGFonts:diagrams-core," >> cabal.project
112113
113114
- name: "Add temporary needed allow-newer for ghc-9.0"
114-
if: steps.get-hackage-version.outputs.exists != 'true' && matrix.ghc == '9.0.1'
115+
if: steps.get-hackage-version.outputs.exists != 'true' && (matrix.ghc == '9.0.1' || matrix.ghc == '9.0.2')
115116
run: |
116117
# TODO: remove when not needed
117118
cd $(ls -d ./incoming/${{ matrix.package }}-*)

.github/workflows/test.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ jobs:
5656
strategy:
5757
fail-fast: true
5858
matrix:
59-
ghc: [ "9.0.1"
59+
ghc: [ "9.0.2"
60+
, "9.0.1"
6061
, "8.10.7"
6162
, "8.10.6"
6263
, "8.8.4"
@@ -144,7 +145,7 @@ jobs:
144145

145146
run: cabal test wrapper-test --test-options="$TEST_OPTS --rerun-log-file .tasty-rerun-log-wrapper" || cabal test wrapper-test --test-options="$TEST_OPTS --rerun-log-file .tasty-rerun-log-wrapper" || cabal test wrapper-test --test-options="$TEST_OPTS --rerun-log-file .tasty-rerun-log-wrapper"
146147

147-
- if: matrix.test && matrix.ghc != '9.0.1'
148+
- if: matrix.test && matrix.ghc != '9.0.1' && matrix.ghc != '9.0.2'
148149
name: Test hls-brittany-plugin
149150
run: cabal test hls-brittany-plugin --test-options="$TEST_OPTS" || cabal test hls-brittany-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-brittany-plugin --test-options="$TEST_OPTS"
150151

@@ -172,7 +173,7 @@ jobs:
172173
name: Test hls-splice-plugin
173174
run: cabal test hls-splice-plugin --test-options="$TEST_OPTS" || cabal test hls-splice-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-splice-plugin --test-options="$TEST_OPTS"
174175

175-
- if: matrix.test && matrix.ghc != '9.0.1'
176+
- if: matrix.test && matrix.ghc != '9.0.1' && matrix.ghc != '9.0.2'
176177
name: Test hls-stylish-haskell-plugin
177178
run: cabal test hls-stylish-haskell-plugin --test-options="$TEST_OPTS" || cabal test hls-stylish-haskell-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-stylish-haskell-plugin --test-options="$TEST_OPTS"
178179

@@ -184,7 +185,7 @@ jobs:
184185
name: Test hls-fourmolu-plugin
185186
run: cabal test hls-fourmolu-plugin --test-options="$TEST_OPTS" || cabal test hls-fourmolu-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-fourmolu-plugin --test-options="$TEST_OPTS"
186187

187-
- if: matrix.test && matrix.ghc != '9.0.1' && !(matrix.os == 'ubuntu-latest' && matrix.ghc == '8.6.5')
188+
- if: matrix.test && matrix.ghc != '9.0.1' && matrix.ghc != '9.0.2' && !(matrix.os == 'ubuntu-latest' && matrix.ghc == '8.6.5')
188189
name: Test hls-tactics-plugin test suite
189190
run: cabal test hls-tactics-plugin --test-options="$TEST_OPTS" || cabal test hls-tactics-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-tactics-plugin --test-options="$TEST_OPTS"
190191

.gitlab-ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ variables:
1818
CABAL_PROJECT: cabal.project
1919
- GHC_VERSION: 9.0.1
2020
CABAL_PROJECT: cabal-ghc901.project
21+
- GHC_VERSION: 9.0.2
22+
CABAL_PROJECT: cabal-ghc902.project
2123

2224
.m1_matrix: &m1_matrix
2325
matrix:

cabal-ghc902.project

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
packages:
2+
./
3+
./hie-compat
4+
./shake-bench
5+
./hls-graph
6+
./ghcide
7+
./hls-plugin-api
8+
./hls-test-utils
9+
./plugins/hls-tactics-plugin
10+
./plugins/hls-brittany-plugin
11+
./plugins/hls-stylish-haskell-plugin
12+
./plugins/hls-fourmolu-plugin
13+
./plugins/hls-class-plugin
14+
./plugins/hls-eval-plugin
15+
./plugins/hls-explicit-imports-plugin
16+
./plugins/hls-refine-imports-plugin
17+
./plugins/hls-hlint-plugin
18+
./plugins/hls-rename-plugin
19+
./plugins/hls-retrie-plugin
20+
./plugins/hls-haddock-comments-plugin
21+
./plugins/hls-splice-plugin
22+
./plugins/hls-qualify-imported-names-plugin
23+
./plugins/hls-floskell-plugin
24+
./plugins/hls-pragmas-plugin
25+
./plugins/hls-module-name-plugin
26+
./plugins/hls-ormolu-plugin
27+
./plugins/hls-call-hierarchy-plugin
28+
./plugins/hls-alternate-number-format-plugin
29+
30+
source-repository-package
31+
type: git
32+
location: https://github.com/tfausak/unix-compat
33+
tag: 154c3a63f154cb49c51d5f9d13488e8119631d8a
34+
-- To fix windows build
35+
-- https://github.com/jacobstanley/unix-compat/pull/47
36+
37+
with-compiler: ghc-9.0.2
38+
39+
tests: true
40+
41+
package *
42+
ghc-options: -haddock
43+
test-show-details: direct
44+
45+
write-ghc-environment-files: never
46+
47+
index-state: 2021-12-29T12:30:08Z
48+
49+
constraints:
50+
-- These plugins don't work on GHC9 yet
51+
haskell-language-server +ignore-plugins-ghc-bounds -brittany -stylishhaskell -tactic,
52+
ghc-lib-parser ^>= 9.0
53+
54+
-- although we are not building all plugins cabal solver phase is run for all packages
55+
-- this way we track explicitly all transitive dependencies which need support for ghc-9
56+
allow-newer:
57+
brittany:base,
58+
brittany:ghc,
59+
brittany:ghc-boot-th,
60+
-- for brittany
61+
butcher:base,
62+
multistate:base,
63+
data-tree-print:base,
64+
65+
stylish-haskell:Cabal,
66+
stylish-haskell:ghc-lib-parser,
67+
68+
floskell:base,
69+
floskell:ghc-prim,
70+
71+
-- for shake-bench
72+
Chart-diagrams:diagrams-core,
73+
SVGFonts:diagrams-core,
74+
75+
-- ghc-9.0.2 specific
76+
hashable:ghc-bignum,
77+
ghc-typelits-natnormalise:ghc-bignum

docs/supported-versions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ The current support for different GHC versions is given in the following table.
77
| GHC version | Last supporting HLS version | Deprecation status |
88
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- |
99
| 9.2.0 | [not supported](https://github.com/haskell/haskell-language-server/issues/2179) yet | |
10+
| 9.0.2 | [current](https://github.com/haskell/haskell-language-server/releases/latest) ([partial](https://github.com/haskell/haskell-language-server/issues/297)) | |
1011
| 9.0.1 | [current](https://github.com/haskell/haskell-language-server/releases/latest) ([partial](https://github.com/haskell/haskell-language-server/issues/297)) | |
1112
| 8.10.7 | [current](https://github.com/haskell/haskell-language-server/releases/latest) | |
1213
| 8.10.6 | [current](https://github.com/haskell/haskell-language-server/releases/latest) | will be deprecated after LTS and HLS full support for ghc-9.0 |

ghcide/ghcide.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ description:
1313
A library for building Haskell IDE's on top of the GHC API.
1414
homepage: https://github.com/haskell/haskell-language-server/tree/master/ghcide#readme
1515
bug-reports: https://github.com/haskell/haskell-language-server/issues
16-
tested-with: GHC == 8.6.5 || == 8.8.4 || == 8.10.6 || == 8.10.7 || == 9.0.1
16+
tested-with: GHC == 8.6.5 || == 8.8.4 || == 8.10.6 || == 8.10.7 || == 9.0.1 || == 9.0.2
1717
extra-source-files: README.md CHANGELOG.md
1818
test/data/**/*.project
1919
test/data/**/*.cabal

ghcide/test/exe/Main.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ diagnosticTests = testGroup "diagnostics"
589589
]
590590
_ <- createDoc "Foo.hs" "haskell" fooContent
591591
if ghcVersion >= GHC90 then
592-
-- Haddock parse errors are ignored on ghc-9.0.1
592+
-- Haddock parse errors are ignored on ghc-9.0
593593
pure ()
594594
else
595595
expectDiagnostics

0 commit comments

Comments
 (0)