diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 78bcf83e1..f4fbbe900 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -169,7 +169,7 @@ jobs: name: Test hls-floskell-plugin run: cabal test hls-floskell-plugin --test-options="$TEST_OPTS" || cabal test hls-floskell-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-floskell-plugin --test-options="$TEST_OPTS" - - if: matrix.test && matrix.ghc != '9.4.2' + - if: matrix.test name: Test hls-class-plugin run: cabal test hls-class-plugin --test-options="$TEST_OPTS" || cabal test hls-class-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-class-plugin --test-options="$TEST_OPTS" diff --git a/cabal.project b/cabal.project index 2a2ee425a..4950a95f3 100644 --- a/cabal.project +++ b/cabal.project @@ -48,7 +48,7 @@ package * write-ghc-environment-files: never -index-state: 2022-09-14T16:53:13Z +index-state: 2022-10-07T12:19:15Z constraints: -- For GHC 9.4, older versions of entropy fail to build on Windows diff --git a/configuration-ghc-94.nix b/configuration-ghc-94.nix index df39a6783..3568f65a5 100644 --- a/configuration-ghc-94.nix +++ b/configuration-ghc-94.nix @@ -25,7 +25,7 @@ let ptr-poker = hself.callCabal2nix "ptr-poker" inputs.ptr-poker { }; ghc-exactprint = - hself.callCabal2nix "ghc-exactprint" inputs.ghc-exactprint-150 { }; + hself.callCabal2nix "ghc-exactprint" inputs.ghc-exactprint-160 { }; # Hlint is still broken hlint = doJailbreak (hself.callCabal2nix "hlint" inputs.hlint { }); diff --git a/docs/support/plugin-support.md b/docs/support/plugin-support.md index e6963ff2b..1bab3b4b9 100644 --- a/docs/support/plugin-support.md +++ b/docs/support/plugin-support.md @@ -46,7 +46,7 @@ For example, a plugin to provide a formatter which has itself been abandoned has | `hls-pragmas-plugin` | 1 | | | `hls-refactor-plugin` | 1 | 9.4 | | `hls-alternate-number-plugin` | 2 | | -| `hls-class-plugin` | 2 | 9.4 | +| `hls-class-plugin` | 2 | | | `hls-change-type-signature-plugin` | 2 | | | `hls-eval-plugin` | 2 | 9.4 | | `hls-explicit-fixity-plugin` | 2 | | diff --git a/flake.nix b/flake.nix index 0ad8731a9..1e4a30ab2 100644 --- a/flake.nix +++ b/flake.nix @@ -39,6 +39,10 @@ url = "https://hackage.haskell.org/package/lsp-test-0.14.1.0/lsp-test-0.14.1.0.tar.gz"; flake = false; }; + ghc-exactprint-160 = { + url = "https://hackage.haskell.org/package/ghc-exactprint-1.6.0/ghc-exactprint-1.6.0.tar.gz"; + flake = false; + }; ghc-exactprint-150 = { url = "https://hackage.haskell.org/package/ghc-exactprint-1.5.0/ghc-exactprint-1.5.0.tar.gz"; flake = false; diff --git a/haskell-language-server.cabal b/haskell-language-server.cabal index d44b07292..184d3a272 100644 --- a/haskell-language-server.cabal +++ b/haskell-language-server.cabal @@ -201,7 +201,7 @@ flag dynamic manual: True common class - if flag(class) && (impl(ghc < 9.4.1) || flag(ignore-plugins-ghc-bounds)) + if flag(class) build-depends: hls-class-plugin ^>= 1.1 cpp-options: -Dhls_class @@ -271,7 +271,7 @@ common splice cpp-options: -Dhls_splice common alternateNumberFormat - if flag(alternateNumberFormat) + if flag(alternateNumberFormat) build-depends: hls-alternate-number-format-plugin ^>= 1.2 cpp-options: -Dhls_alternateNumberFormat diff --git a/plugins/hls-class-plugin/hls-class-plugin.cabal b/plugins/hls-class-plugin/hls-class-plugin.cabal index 7fd5483ed..67c9ec9ec 100644 --- a/plugins/hls-class-plugin/hls-class-plugin.cabal +++ b/plugins/hls-class-plugin/hls-class-plugin.cabal @@ -25,10 +25,6 @@ source-repository head location: https://github.com/haskell/haskell-language-server.git library - if impl(ghc >= 9.3) - buildable: False - else - buildable: True exposed-modules: Ide.Plugin.Class other-modules: Ide.Plugin.Class.CodeAction , Ide.Plugin.Class.CodeLens @@ -53,9 +49,9 @@ library , transformers if impl(ghc >=9.2.1) - build-depends: ghc-exactprint ^>= 1.5 + build-depends: ghc-exactprint >= 1.5 else - build-depends: ghc-exactprint >= 0.6.4 && <1.1 + build-depends: ghc-exactprint >= 0.6.4 && <1.1 default-language: Haskell2010 default-extensions: @@ -66,10 +62,6 @@ library ghc-options: -Wall -Wno-unticked-promoted-constructors -Wno-name-shadowing test-suite tests - if impl(ghc >= 9.3) - buildable: False - else - buildable: True type: exitcode-stdio-1.0 default-language: Haskell2010 hs-source-dirs: test diff --git a/plugins/hls-class-plugin/test/Main.hs b/plugins/hls-class-plugin/test/Main.hs index b15efb749..585f49143 100644 --- a/plugins/hls-class-plugin/test/Main.hs +++ b/plugins/hls-class-plugin/test/Main.hs @@ -69,7 +69,7 @@ codeActionTests recorder = testGroup executeCodeAction gAction , goldenWithClass recorder "Creates a placeholder for other two methods" "T6" "2" $ \(_:_:ghAction:_) -> do executeCodeAction ghAction - , onlyRunForGhcVersions [GHC92] "Only ghc-9.2 enabled GHC2021 implicitly" $ + , onlyRunForGhcVersions [GHC92, GHC94] "Only ghc-9.2+ enabled GHC2021 implicitly" $ goldenWithClass recorder "Don't insert pragma with GHC2021" "InsertWithGHC2021Enabled" "" $ \(_:eqWithSig:_) -> do executeCodeAction eqWithSig , goldenWithClass recorder "Insert pragma if not exist" "InsertWithoutPragma" "" $ \(_:eqWithSig:_) -> do @@ -96,7 +96,7 @@ codeLensTests recorder = testGroup , goldenCodeLens recorder "Apply code lens for local class" "LocalClassDefine" 0 , goldenCodeLens recorder "Apply code lens on the same line" "Inline" 0 , goldenCodeLens recorder "Don't insert pragma while existing" "CodeLensWithPragma" 0 - , onlyRunForGhcVersions [GHC92] "Only ghc-9.2 enabled GHC2021 implicitly" $ + , onlyRunForGhcVersions [GHC92, GHC94] "Only ghc-9.2+ enabled GHC2021 implicitly" $ goldenCodeLens recorder "Don't insert pragma while GHC2021 enabled" "CodeLensWithGHC2021" 0 , goldenCodeLens recorder "Qualified name" "Qualified" 0 , goldenCodeLens recorder "Type family" "TypeFamily" 0