Skip to content

Commit a253f1f

Browse files
authored
Various 9.8 compat (#3998)
* Stylish-haskell now supports 9.8 * Ormolu and fourmolu already support 9.8 * New version of floskell in fact builds with 9.8 * New hlint builds with 9.8
1 parent 0a02832 commit a253f1f

File tree

7 files changed

+12
-48
lines changed

7 files changed

+12
-48
lines changed

.github/workflows/test.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ jobs:
139139
name: Test hls-refactor-plugin
140140
run: cabal test hls-refactor-plugin --test-options="$TEST_OPTS" || cabal test hls-refactor-plugin --test-options="$TEST_OPTS"
141141

142-
- if: matrix.test && matrix.ghc != '9.6' && !startsWith(matrix.ghc,'9.8')
142+
- if: matrix.test
143143
name: Test hls-floskell-plugin
144144
run: cabal test hls-floskell-plugin --test-options="$TEST_OPTS" || cabal test hls-floskell-plugin --test-options="$TEST_OPTS"
145145

@@ -163,15 +163,15 @@ jobs:
163163
name: Test hls-stan-plugin
164164
run: cabal test hls-stan-plugin --test-options="$TEST_OPTS" || cabal test hls-stan-plugin --test-options="$TEST_OPTS"
165165

166-
- if: matrix.test && !startsWith(matrix.ghc,'9.8')
166+
- if: matrix.test
167167
name: Test hls-stylish-haskell-plugin
168168
run: cabal test hls-stylish-haskell-plugin --test-options="$TEST_OPTS" || cabal test hls-stylish-haskell-plugin --test-options="$TEST_OPTS"
169169

170-
- if: matrix.test && !startsWith(matrix.ghc,'9.8')
170+
- if: matrix.test
171171
name: Test hls-ormolu-plugin
172172
run: cabal test hls-ormolu-plugin --test-options="$TEST_OPTS" || cabal test hls-ormolu-plugin --test-options="$TEST_OPTS"
173173

174-
- if: matrix.test && !startsWith(matrix.ghc,'9.8')
174+
- if: matrix.test
175175
name: Test hls-fourmolu-plugin
176176
run: cabal test hls-fourmolu-plugin --test-options="$TEST_OPTS" || cabal test hls-fourmolu-plugin --test-options="$TEST_OPTS"
177177

@@ -187,7 +187,7 @@ jobs:
187187
name: Test hls-rename-plugin test suite
188188
run: cabal test hls-rename-plugin --test-options="$TEST_OPTS" || cabal test hls-rename-plugin --test-options="$TEST_OPTS"
189189

190-
- if: matrix.test && !startsWith(matrix.ghc,'9.8')
190+
- if: matrix.test
191191
name: Test hls-hlint-plugin test suite
192192
run: cabal test hls-hlint-plugin --test-options="$TEST_OPTS" || cabal test hls-hlint-plugin --test-options="$TEST_OPTS"
193193

cabal.project

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ packages:
3636
./plugins/hls-overloaded-record-dot-plugin
3737
./plugins/hls-semantic-tokens-plugin
3838

39-
index-state: 2024-01-19T00:00:00Z
39+
index-state: 2024-01-21T00:00:00Z
4040

4141
tests: True
4242
test-show-details: direct

docs/support/plugin-support.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,15 @@ For example, a plugin to provide a formatter which has itself been abandoned has
5454
| `hls-explicit-record-fields-plugin` | 2 | |
5555
| `hls-fourmolu-plugin` | 2 | |
5656
| `hls-gadt-plugin` | 2 | |
57-
| `hls-hlint-plugin` | 2 | 9.8 |
57+
| `hls-hlint-plugin` | 2 | |
5858
| `hls-module-name-plugin` | 2 | |
5959
| `hls-qualify-imported-names-plugin` | 2 | |
6060
| `hls-ormolu-plugin` | 2 | |
6161
| `hls-rename-plugin` | 2 | |
62-
| `hls-stylish-haskell-plugin` | 2 | 9.8 |
62+
| `hls-stylish-haskell-plugin` | 2 | |
6363
| `hls-overloaded-record-dot-plugin` | 2 | |
6464
| `hls-semantic-tokens-plugin` | 2 | |
65-
| `hls-floskell-plugin` | 3 | 9.8 |
65+
| `hls-floskell-plugin` | 3 | |
6666
| `hls-stan-plugin` | 3 | 9.2.(4-8) |
6767
| `hls-retrie-plugin` | 3 | |
6868
| `hls-splice-plugin` | 3 | |

plugins/hls-floskell-plugin/hls-floskell-plugin.cabal

-5
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ source-repository head
2121
location: https://github.com/haskell/haskell-language-server.git
2222

2323
library
24-
-- floskell does not support GHC 9.8 yet
25-
if impl(ghc >= 9.7)
26-
buildable: False
2724
exposed-modules: Ide.Plugin.Floskell
2825
hs-source-dirs: src
2926
build-depends:
@@ -39,8 +36,6 @@ library
3936
default-language: Haskell2010
4037

4138
test-suite tests
42-
if impl(ghc >= 9.7)
43-
buildable: False
4439
type: exitcode-stdio-1.0
4540
default-language: Haskell2010
4641
hs-source-dirs: test

plugins/hls-hlint-plugin/hls-hlint-plugin.cabal

+1-10
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,6 @@ flag pedantic
3030
manual: True
3131

3232
library
33-
-- Plugins that need exactprint have not been updated for 9.8 yet
34-
if impl(ghc >= 9.8)
35-
buildable: False
36-
else
37-
buildable: True
3833
exposed-modules: Ide.Plugin.Hlint
3934
hs-source-dirs: src
4035
build-depends:
@@ -52,7 +47,7 @@ library
5247
, ghc-exactprint >=0.6.3.4
5348
, ghcide == 2.6.0.0
5449
, hashable
55-
, hlint >= 3.5 && < 3.7
50+
, hlint >= 3.5 && < 3.9
5651
, hls-plugin-api == 2.6.0.0
5752
, lens
5853
, lsp
@@ -82,10 +77,6 @@ library
8277
TypeOperators
8378

8479
test-suite tests
85-
if impl(ghc >= 9.8)
86-
buildable: False
87-
else
88-
buildable: True
8980
type: exitcode-stdio-1.0
9081
default-language: Haskell2010
9182
hs-source-dirs: test

plugins/hls-hlint-plugin/test/Main.hs

+2-15
Original file line numberDiff line numberDiff line change
@@ -202,14 +202,9 @@ suggestionsTests =
202202
doc <- openDoc "IgnoreAnnHlint.hs" "haskell"
203203
expectNoMoreDiagnostics 3 doc "hlint"
204204

205-
, knownBrokenForGhcVersions [GHC92, GHC94, GHC96] "apply-refact has different behavior on v0.10" $
206-
testCase "apply-refact preserve regular comments" $ runHlintSession "" $ do
205+
, testCase "apply-refact preserve regular comments" $ runHlintSession "" $ do
207206
testRefactor "Comments.hs" "Redundant bracket" expectedComments
208207

209-
, onlyRunForGhcVersions [GHC92, GHC94, GHC96] "only run test for apply-refact-0.10" $
210-
testCase "apply-refact preserve regular comments" $ runHlintSession "" $ do
211-
testRefactor "Comments.hs" "Redundant bracket" expectedComments'
212-
213208
, testCase "[#2290] apply all hints works with a trailing comment" $ runHlintSession "" $ do
214209
testRefactor "TwoHintsAndComment.hs" "Apply all hints" expectedComments2
215210

@@ -275,15 +270,7 @@ suggestionsTests =
275270
, "g = 2"
276271
, "#endif", ""
277272
]
278-
expectedComments = [ "-- comment before header"
279-
, "module Comments where", ""
280-
, "{-# standalone annotation #-}", ""
281-
, "-- standalone comment", ""
282-
, "-- | haddock comment"
283-
, "f = {- inline comment -}{- inline comment inside refactored code -} 1 -- ending comment", ""
284-
, "-- final comment"
285-
]
286-
expectedComments' = [ "-- comment before header"
273+
expectedComments = [ "-- comment before header"
287274
, "module Comments where", ""
288275
, "{-# standalone annotation #-}", ""
289276
, "-- standalone comment", ""

plugins/hls-stylish-haskell-plugin/hls-stylish-haskell-plugin.cabal

-9
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@ source-repository head
2020
location: https://github.com/haskell/haskell-language-server.git
2121

2222
library
23-
-- Plugins that need exactprint have not been updated for 9.8 yet
24-
if impl(ghc >= 9.8)
25-
buildable: False
26-
else
27-
buildable: True
2823
exposed-modules: Ide.Plugin.StylishHaskell
2924
hs-source-dirs: src
3025
build-depends:
@@ -43,10 +38,6 @@ library
4338
default-language: Haskell2010
4439

4540
test-suite tests
46-
if impl(ghc >= 9.8)
47-
buildable: False
48-
else
49-
buildable: True
5041
type: exitcode-stdio-1.0
5142
default-language: Haskell2010
5243
hs-source-dirs: test

0 commit comments

Comments
 (0)