Skip to content
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

Various 9.8 compat #3998

Merged
merged 5 commits into from
Jan 21, 2024
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
10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ jobs:
name: Test hls-refactor-plugin
run: cabal test hls-refactor-plugin --test-options="$TEST_OPTS" || cabal test hls-refactor-plugin --test-options="$TEST_OPTS"

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

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

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

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

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

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

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

Expand Down
2 changes: 1 addition & 1 deletion cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ packages:
./plugins/hls-overloaded-record-dot-plugin
./plugins/hls-semantic-tokens-plugin

index-state: 2024-01-19T00:00:00Z
index-state: 2024-01-21T00:00:00Z

tests: True
test-show-details: direct
Expand Down
6 changes: 3 additions & 3 deletions docs/support/plugin-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ For example, a plugin to provide a formatter which has itself been abandoned has
| `hls-explicit-record-fields-plugin` | 2 | |
| `hls-fourmolu-plugin` | 2 | |
| `hls-gadt-plugin` | 2 | |
| `hls-hlint-plugin` | 2 | 9.8 |
| `hls-hlint-plugin` | 2 | |
| `hls-module-name-plugin` | 2 | |
| `hls-qualify-imported-names-plugin` | 2 | |
| `hls-ormolu-plugin` | 2 | |
| `hls-rename-plugin` | 2 | |
| `hls-stylish-haskell-plugin` | 2 | 9.8 |
| `hls-stylish-haskell-plugin` | 2 | |
| `hls-overloaded-record-dot-plugin` | 2 | |
| `hls-semantic-tokens-plugin` | 2 | |
| `hls-floskell-plugin` | 3 | 9.8 |
| `hls-floskell-plugin` | 3 | |
| `hls-stan-plugin` | 3 | 9.2.(4-8) |
| `hls-retrie-plugin` | 3 | |
| `hls-splice-plugin` | 3 | |
5 changes: 0 additions & 5 deletions plugins/hls-floskell-plugin/hls-floskell-plugin.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ source-repository head
location: https:/haskell/haskell-language-server.git

library
-- floskell does not support GHC 9.8 yet
if impl(ghc >= 9.7)
buildable: False
exposed-modules: Ide.Plugin.Floskell
hs-source-dirs: src
build-depends:
Expand All @@ -39,8 +36,6 @@ library
default-language: Haskell2010

test-suite tests
if impl(ghc >= 9.7)
buildable: False
type: exitcode-stdio-1.0
default-language: Haskell2010
hs-source-dirs: test
Expand Down
11 changes: 1 addition & 10 deletions plugins/hls-hlint-plugin/hls-hlint-plugin.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ flag pedantic
manual: True

library
-- Plugins that need exactprint have not been updated for 9.8 yet
if impl(ghc >= 9.8)
buildable: False
else
buildable: True
exposed-modules: Ide.Plugin.Hlint
hs-source-dirs: src
build-depends:
Expand All @@ -52,7 +47,7 @@ library
, ghc-exactprint >=0.6.3.4
, ghcide == 2.6.0.0
, hashable
, hlint >= 3.5 && < 3.7
, hlint >= 3.5 && < 3.9
, hls-plugin-api == 2.6.0.0
, lens
, lsp
Expand Down Expand Up @@ -82,10 +77,6 @@ library
TypeOperators

test-suite tests
if impl(ghc >= 9.8)
buildable: False
else
buildable: True
type: exitcode-stdio-1.0
default-language: Haskell2010
hs-source-dirs: test
Expand Down
17 changes: 2 additions & 15 deletions plugins/hls-hlint-plugin/test/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -202,14 +202,9 @@ suggestionsTests =
doc <- openDoc "IgnoreAnnHlint.hs" "haskell"
expectNoMoreDiagnostics 3 doc "hlint"

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

, onlyRunForGhcVersions [GHC92, GHC94, GHC96] "only run test for apply-refact-0.10" $
testCase "apply-refact preserve regular comments" $ runHlintSession "" $ do
testRefactor "Comments.hs" "Redundant bracket" expectedComments'

, testCase "[#2290] apply all hints works with a trailing comment" $ runHlintSession "" $ do
testRefactor "TwoHintsAndComment.hs" "Apply all hints" expectedComments2

Expand Down Expand Up @@ -275,15 +270,7 @@ suggestionsTests =
, "g = 2"
, "#endif", ""
]
expectedComments = [ "-- comment before header"
, "module Comments where", ""
, "{-# standalone annotation #-}", ""
, "-- standalone comment", ""
, "-- | haddock comment"
, "f = {- inline comment -}{- inline comment inside refactored code -} 1 -- ending comment", ""
, "-- final comment"
]
expectedComments' = [ "-- comment before header"
expectedComments = [ "-- comment before header"
, "module Comments where", ""
, "{-# standalone annotation #-}", ""
, "-- standalone comment", ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ source-repository head
location: https:/haskell/haskell-language-server.git

library
-- Plugins that need exactprint have not been updated for 9.8 yet
if impl(ghc >= 9.8)
buildable: False
else
buildable: True
exposed-modules: Ide.Plugin.StylishHaskell
hs-source-dirs: src
build-depends:
Expand All @@ -43,10 +38,6 @@ library
default-language: Haskell2010

test-suite tests
if impl(ghc >= 9.8)
buildable: False
else
buildable: True
type: exitcode-stdio-1.0
default-language: Haskell2010
hs-source-dirs: test
Expand Down
Loading