mirror of
https://github.com/haskell/haskell-language-server.git
synced 2024-09-11 08:45:35 +03:00
Support ghc 9.4 for hls-class-plugin (#3258)
* Support ghc 9.4 for hls-class-plugin * Update support table * Update test description * Update nix dependency
This commit is contained in:
parent
e36208bf72
commit
8cef7a456a
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
@ -169,7 +169,7 @@ jobs:
|
|||||||
name: Test hls-floskell-plugin
|
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"
|
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
|
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"
|
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"
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ package *
|
|||||||
|
|
||||||
write-ghc-environment-files: never
|
write-ghc-environment-files: never
|
||||||
|
|
||||||
index-state: 2022-09-14T16:53:13Z
|
index-state: 2022-10-07T12:19:15Z
|
||||||
|
|
||||||
constraints:
|
constraints:
|
||||||
-- For GHC 9.4, older versions of entropy fail to build on Windows
|
-- For GHC 9.4, older versions of entropy fail to build on Windows
|
||||||
|
@ -25,7 +25,7 @@ let
|
|||||||
ptr-poker = hself.callCabal2nix "ptr-poker" inputs.ptr-poker { };
|
ptr-poker = hself.callCabal2nix "ptr-poker" inputs.ptr-poker { };
|
||||||
|
|
||||||
ghc-exactprint =
|
ghc-exactprint =
|
||||||
hself.callCabal2nix "ghc-exactprint" inputs.ghc-exactprint-150 { };
|
hself.callCabal2nix "ghc-exactprint" inputs.ghc-exactprint-160 { };
|
||||||
# Hlint is still broken
|
# Hlint is still broken
|
||||||
hlint = doJailbreak (hself.callCabal2nix "hlint" inputs.hlint { });
|
hlint = doJailbreak (hself.callCabal2nix "hlint" inputs.hlint { });
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ For example, a plugin to provide a formatter which has itself been abandoned has
|
|||||||
| `hls-pragmas-plugin` | 1 | |
|
| `hls-pragmas-plugin` | 1 | |
|
||||||
| `hls-refactor-plugin` | 1 | 9.4 |
|
| `hls-refactor-plugin` | 1 | 9.4 |
|
||||||
| `hls-alternate-number-plugin` | 2 | |
|
| `hls-alternate-number-plugin` | 2 | |
|
||||||
| `hls-class-plugin` | 2 | 9.4 |
|
| `hls-class-plugin` | 2 | |
|
||||||
| `hls-change-type-signature-plugin` | 2 | |
|
| `hls-change-type-signature-plugin` | 2 | |
|
||||||
| `hls-eval-plugin` | 2 | 9.4 |
|
| `hls-eval-plugin` | 2 | 9.4 |
|
||||||
| `hls-explicit-fixity-plugin` | 2 | |
|
| `hls-explicit-fixity-plugin` | 2 | |
|
||||||
|
@ -39,6 +39,10 @@
|
|||||||
url = "https://hackage.haskell.org/package/lsp-test-0.14.1.0/lsp-test-0.14.1.0.tar.gz";
|
url = "https://hackage.haskell.org/package/lsp-test-0.14.1.0/lsp-test-0.14.1.0.tar.gz";
|
||||||
flake = false;
|
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 = {
|
ghc-exactprint-150 = {
|
||||||
url = "https://hackage.haskell.org/package/ghc-exactprint-1.5.0/ghc-exactprint-1.5.0.tar.gz";
|
url = "https://hackage.haskell.org/package/ghc-exactprint-1.5.0/ghc-exactprint-1.5.0.tar.gz";
|
||||||
flake = false;
|
flake = false;
|
||||||
|
@ -201,7 +201,7 @@ flag dynamic
|
|||||||
manual: True
|
manual: True
|
||||||
|
|
||||||
common class
|
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
|
build-depends: hls-class-plugin ^>= 1.1
|
||||||
cpp-options: -Dhls_class
|
cpp-options: -Dhls_class
|
||||||
|
|
||||||
@ -271,7 +271,7 @@ common splice
|
|||||||
cpp-options: -Dhls_splice
|
cpp-options: -Dhls_splice
|
||||||
|
|
||||||
common alternateNumberFormat
|
common alternateNumberFormat
|
||||||
if flag(alternateNumberFormat)
|
if flag(alternateNumberFormat)
|
||||||
build-depends: hls-alternate-number-format-plugin ^>= 1.2
|
build-depends: hls-alternate-number-format-plugin ^>= 1.2
|
||||||
cpp-options: -Dhls_alternateNumberFormat
|
cpp-options: -Dhls_alternateNumberFormat
|
||||||
|
|
||||||
|
@ -25,10 +25,6 @@ source-repository head
|
|||||||
location: https://github.com/haskell/haskell-language-server.git
|
location: https://github.com/haskell/haskell-language-server.git
|
||||||
|
|
||||||
library
|
library
|
||||||
if impl(ghc >= 9.3)
|
|
||||||
buildable: False
|
|
||||||
else
|
|
||||||
buildable: True
|
|
||||||
exposed-modules: Ide.Plugin.Class
|
exposed-modules: Ide.Plugin.Class
|
||||||
other-modules: Ide.Plugin.Class.CodeAction
|
other-modules: Ide.Plugin.Class.CodeAction
|
||||||
, Ide.Plugin.Class.CodeLens
|
, Ide.Plugin.Class.CodeLens
|
||||||
@ -53,9 +49,9 @@ library
|
|||||||
, transformers
|
, transformers
|
||||||
|
|
||||||
if impl(ghc >=9.2.1)
|
if impl(ghc >=9.2.1)
|
||||||
build-depends: ghc-exactprint ^>= 1.5
|
build-depends: ghc-exactprint >= 1.5
|
||||||
else
|
else
|
||||||
build-depends: ghc-exactprint >= 0.6.4 && <1.1
|
build-depends: ghc-exactprint >= 0.6.4 && <1.1
|
||||||
|
|
||||||
default-language: Haskell2010
|
default-language: Haskell2010
|
||||||
default-extensions:
|
default-extensions:
|
||||||
@ -66,10 +62,6 @@ library
|
|||||||
ghc-options: -Wall -Wno-unticked-promoted-constructors -Wno-name-shadowing
|
ghc-options: -Wall -Wno-unticked-promoted-constructors -Wno-name-shadowing
|
||||||
|
|
||||||
test-suite tests
|
test-suite tests
|
||||||
if impl(ghc >= 9.3)
|
|
||||||
buildable: False
|
|
||||||
else
|
|
||||||
buildable: True
|
|
||||||
type: exitcode-stdio-1.0
|
type: exitcode-stdio-1.0
|
||||||
default-language: Haskell2010
|
default-language: Haskell2010
|
||||||
hs-source-dirs: test
|
hs-source-dirs: test
|
||||||
|
@ -69,7 +69,7 @@ codeActionTests recorder = testGroup
|
|||||||
executeCodeAction gAction
|
executeCodeAction gAction
|
||||||
, goldenWithClass recorder "Creates a placeholder for other two methods" "T6" "2" $ \(_:_:ghAction:_) -> do
|
, goldenWithClass recorder "Creates a placeholder for other two methods" "T6" "2" $ \(_:_:ghAction:_) -> do
|
||||||
executeCodeAction ghAction
|
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
|
goldenWithClass recorder "Don't insert pragma with GHC2021" "InsertWithGHC2021Enabled" "" $ \(_:eqWithSig:_) -> do
|
||||||
executeCodeAction eqWithSig
|
executeCodeAction eqWithSig
|
||||||
, goldenWithClass recorder "Insert pragma if not exist" "InsertWithoutPragma" "" $ \(_:eqWithSig:_) -> do
|
, 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 for local class" "LocalClassDefine" 0
|
||||||
, goldenCodeLens recorder "Apply code lens on the same line" "Inline" 0
|
, goldenCodeLens recorder "Apply code lens on the same line" "Inline" 0
|
||||||
, goldenCodeLens recorder "Don't insert pragma while existing" "CodeLensWithPragma" 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 "Don't insert pragma while GHC2021 enabled" "CodeLensWithGHC2021" 0
|
||||||
, goldenCodeLens recorder "Qualified name" "Qualified" 0
|
, goldenCodeLens recorder "Qualified name" "Qualified" 0
|
||||||
, goldenCodeLens recorder "Type family" "TypeFamily" 0
|
, goldenCodeLens recorder "Type family" "TypeFamily" 0
|
||||||
|
Loading…
Reference in New Issue
Block a user