From ddc67b2d4d719623b657aa54db20bf58c58a5d4a Mon Sep 17 00:00:00 2001 From: Michael Peyton Jones Date: Mon, 9 Jan 2023 21:08:08 +0000 Subject: [PATCH] Support stylish-haskell and ormolu in 9.4 (#3446) * Update index-state * Enable ormolu on 9.4 * Enable stylish-haskell on 9.4 * Update flake.lock * Declare 9.4 to be fully supported * Enable floskell for 9.4 --- .github/workflows/test.yml | 6 +++--- cabal.project | 2 +- docs/support/ghc-version-support.md | 8 ++++---- docs/support/plugin-support.md | 8 ++++---- flake.lock | 13 ------------- haskell-language-server.cabal | 6 +++--- .../hls-floskell-plugin/hls-floskell-plugin.cabal | 8 -------- plugins/hls-ormolu-plugin/hls-ormolu-plugin.cabal | 8 -------- .../hls-stylish-haskell-plugin.cabal | 8 -------- 9 files changed, 15 insertions(+), 52 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d75a54dc3b..f2260dbeea 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -169,7 +169,7 @@ jobs: name: Test hls-refactor-plugin run: cabal test hls-refactor-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-refactor-plugin --test-options="$TEST_OPTS" - - if: matrix.test && matrix.ghc != '9.4.2' && matrix.ghc != '9.4.3' + - if: matrix.test name: Test hls-floskell-plugin run: 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" @@ -193,11 +193,11 @@ jobs: name: Test hls-splice-plugin run: 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" - - if: matrix.test && matrix.ghc != '9.4.2' && matrix.ghc != '9.4.3' + - if: matrix.test name: Test hls-stylish-haskell-plugin run: 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" - - if: matrix.test && matrix.ghc != '9.4.2' && matrix.ghc != '9.4.3' + - if: matrix.test name: Test hls-ormolu-plugin run: cabal test hls-ormolu-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-ormolu-plugin --test-options="$TEST_OPTS" diff --git a/cabal.project b/cabal.project index 732330cb30..60ed590606 100644 --- a/cabal.project +++ b/cabal.project @@ -50,7 +50,7 @@ package * write-ghc-environment-files: never -index-state: 2022-12-19T19:08:33Z +index-state: 2023-01-10T00:00:00Z constraints: -- For GHC 9.4, older versions of entropy fail to build on Windows diff --git a/docs/support/ghc-version-support.md b/docs/support/ghc-version-support.md index 1f7ec00aa0..0b4b19ee0d 100644 --- a/docs/support/ghc-version-support.md +++ b/docs/support/ghc-version-support.md @@ -17,10 +17,10 @@ Support status (see the support policy below for more details): | GHC version | Last supporting HLS version | Support status | |--------------|------------------------------------------------------------------------------------|-----------------------------------------------------------------------------| -| 9.4.4 | [latest](https://github.com/haskell/haskell-language-server/releases/latest) | basic support | -| 9.4.3 | [latest](https://github.com/haskell/haskell-language-server/releases/latest) | basic support | -| 9.4.2 | [1.8.0.0](https://github.com/haskell/haskell-language-server/releases/tag/1.8.0.0) | basic support | -| 9.4.1 | [1.8.0.0](https://github.com/haskell/haskell-language-server/releases/tag/1.8.0.0) | basic support | +| 9.4.4 | [latest](https://github.com/haskell/haskell-language-server/releases/latest) | full support | +| 9.4.3 | [latest](https://github.com/haskell/haskell-language-server/releases/latest) | full support | +| 9.4.2 | [1.8.0.0](https://github.com/haskell/haskell-language-server/releases/tag/1.8.0.0) | full support | +| 9.4.1 | [1.8.0.0](https://github.com/haskell/haskell-language-server/releases/tag/1.8.0.0) | full support | | 9.2.5 | [latest](https://github.com/haskell/haskell-language-server/releases/latest) | full support | | 9.2.4 | [1.8.0.0](https://github.com/haskell/haskell-language-server/releases/tag/1.8.0.0) | full support | | 9.2.3 | [1.8.0.0](https://github.com/haskell/haskell-language-server/releases/tag/1.8.0.0) | full support | diff --git a/docs/support/plugin-support.md b/docs/support/plugin-support.md index 464893a445..ec11152e1f 100644 --- a/docs/support/plugin-support.md +++ b/docs/support/plugin-support.md @@ -52,16 +52,16 @@ For example, a plugin to provide a formatter which has itself been abandoned has | `hls-eval-plugin` | 2 | 9.4 | | `hls-explicit-fixity-plugin` | 2 | | | `hls-explicit-record-fields-plugin` | 2 | | -| `hls-floskell-plugin` | 2 | 9.4 | +| `hls-floskell-plugin` | 2 | | | `hls-fourmolu-plugin` | 2 | | | `hls-gadt-plugin` | 2 | | | `hls-hlint-plugin` | 2 | | | `hls-module-name-plugin` | 2 | | | `hls-qualify-imported-names-plugin` | 2 | | -| `hls-ormolu-plugin` | 2 | 9.4 | -| `hls-rename-plugin` | 2 | 9.4 | +| `hls-ormolu-plugin` | 2 | | +| `hls-rename-plugin` | 2 | | | `hls-refine-imports-plugin` | 2 | | -| `hls-stylish-haskell-plugin` | 2 | 9.4 | +| `hls-stylish-haskell-plugin` | 2 | | | `hls-tactics-plugin` | 2 | 9.2, 9.4 | | `hls-haddock-comments-plugin` | 3 | 9.2, 9.4 | | `hls-stan-plugin` | 3 | 8.6, 9.0, 9.2, 9.4 | diff --git a/flake.lock b/flake.lock index 8e4365019d..c0e8cd135d 100644 --- a/flake.lock +++ b/flake.lock @@ -53,18 +53,6 @@ "url": "https://hackage.haskell.org/package/apply-refact-0.9.3.0/apply-refact-0.9.3.0.tar.gz" } }, - "brittany-01312": { - "flake": false, - "locked": { - "narHash": "sha256-4rDE2bu4C8cv1D6lkTtLxMwLRyDfIK70BnptSrygK60=", - "type": "tarball", - "url": "https://hackage.haskell.org/package/brittany-0.13.1.2/brittany-0.13.1.2.tar.gz" - }, - "original": { - "type": "tarball", - "url": "https://hackage.haskell.org/package/brittany-0.13.1.2/brittany-0.13.1.2.tar.gz" - } - }, "constraints-extras": { "flake": false, "locked": { @@ -302,7 +290,6 @@ "all-cabal-hashes-unpacked": "all-cabal-hashes-unpacked", "apply-refact": "apply-refact", "apply-refact-0930": "apply-refact-0930", - "brittany-01312": "brittany-01312", "constraints-extras": "constraints-extras", "flake-compat": "flake-compat", "flake-utils": "flake-utils", diff --git a/haskell-language-server.cabal b/haskell-language-server.cabal index 63bdff7ab5..22a6491eb5 100644 --- a/haskell-language-server.cabal +++ b/haskell-language-server.cabal @@ -329,7 +329,7 @@ common explicitFields -- formatters common floskell - if flag(floskell) && (impl(ghc < 9.4.1) || flag(ignore-plugins-ghc-bounds)) + if flag(floskell) build-depends: hls-floskell-plugin ^>= 1.0 cpp-options: -Dhls_floskell @@ -339,12 +339,12 @@ common fourmolu cpp-options: -Dhls_fourmolu common ormolu - if flag(ormolu) && (impl(ghc < 9.4.1) || flag(ignore-plugins-ghc-bounds)) + if flag(ormolu) build-depends: hls-ormolu-plugin ^>= 1.0 cpp-options: -Dhls_ormolu common stylishHaskell - if flag(stylishHaskell) && (impl(ghc < 9.4.1) || flag(ignore-plugins-ghc-bounds)) + if flag(stylishHaskell) build-depends: hls-stylish-haskell-plugin ^>= 1.0 cpp-options: -Dhls_stylishHaskell diff --git a/plugins/hls-floskell-plugin/hls-floskell-plugin.cabal b/plugins/hls-floskell-plugin/hls-floskell-plugin.cabal index 7141d436db..a4d39b0aa8 100644 --- a/plugins/hls-floskell-plugin/hls-floskell-plugin.cabal +++ b/plugins/hls-floskell-plugin/hls-floskell-plugin.cabal @@ -21,10 +21,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.Floskell hs-source-dirs: src build-depends: @@ -39,10 +35,6 @@ library default-language: Haskell2010 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-ormolu-plugin/hls-ormolu-plugin.cabal b/plugins/hls-ormolu-plugin/hls-ormolu-plugin.cabal index 6772d54afa..f9d9870a96 100644 --- a/plugins/hls-ormolu-plugin/hls-ormolu-plugin.cabal +++ b/plugins/hls-ormolu-plugin/hls-ormolu-plugin.cabal @@ -21,10 +21,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.Ormolu hs-source-dirs: src build-depends: @@ -42,10 +38,6 @@ library default-language: Haskell2010 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-stylish-haskell-plugin/hls-stylish-haskell-plugin.cabal b/plugins/hls-stylish-haskell-plugin/hls-stylish-haskell-plugin.cabal index 08420a0d25..c494e44eff 100644 --- a/plugins/hls-stylish-haskell-plugin/hls-stylish-haskell-plugin.cabal +++ b/plugins/hls-stylish-haskell-plugin/hls-stylish-haskell-plugin.cabal @@ -20,10 +20,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.StylishHaskell hs-source-dirs: src build-depends: @@ -41,10 +37,6 @@ library default-language: Haskell2010 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