Skip to content

Commit a941fb7

Browse files
committed
Enable hls-cabal-gild-plugin for GHC 9.12.2
1 parent 53bf92c commit a941fb7

File tree

4 files changed

+17
-6
lines changed

4 files changed

+17
-6
lines changed

docs/support/plugin-support.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ For example, a plugin to provide a formatter which has itself been abandoned has
4747
| `hls-refactor-plugin` | 2 | 9.12.2 |
4848
| `hls-alternate-number-format-plugin` | 2 | |
4949
| `hls-cabal-fmt-plugin` | 2 | |
50-
| `hls-cabal-gild-plugin` | 2 | 9.12.2 |
50+
| `hls-cabal-gild-plugin` | 2 | |
5151
| `hls-class-plugin` | 2 | |
5252
| `hls-change-type-signature-plugin` | 2 | |
5353
| `hls-eval-plugin` | 2 | |

haskell-language-server.cabal

+5-5
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ flag cabalfmt
117117
manual: True
118118

119119
common cabalfmt
120-
if flag(cabalfmt)
120+
if flag(cabalfmt) && flag(cabal)
121121
build-depends: haskell-language-server:hls-cabal-fmt-plugin
122122
cpp-options: -Dhls_cabalfmt
123123

@@ -129,7 +129,7 @@ flag isolateCabalfmtTests
129129

130130
library hls-cabal-fmt-plugin
131131
import: defaults, pedantic, warnings
132-
if !flag(cabalfmt)
132+
if !flag(cabalfmt) || !flag(cabal)
133133
buildable: False
134134
exposed-modules: Ide.Plugin.CabalFmt
135135
hs-source-dirs: plugins/hls-cabal-fmt-plugin/src
@@ -174,7 +174,7 @@ flag cabalgild
174174
manual: True
175175

176176
common cabalgild
177-
if flag(cabalgild) && (impl(ghc < 9.11) || flag(ignore-plugins-ghc-bounds))
177+
if flag(cabalgild) && flag(cabal)
178178
build-depends: haskell-language-server:hls-cabal-gild-plugin
179179
cpp-options: -Dhls_cabalgild
180180

@@ -186,7 +186,7 @@ flag isolateCabalGildTests
186186

187187
library hls-cabal-gild-plugin
188188
import: defaults, pedantic, warnings
189-
if !flag(cabalgild) || (impl(ghc > 9.11) && !flag(ignore-plugins-ghc-bounds))
189+
if !flag(cabalgild) || !flag(cabal)
190190
buildable: False
191191
exposed-modules: Ide.Plugin.CabalGild
192192
hs-source-dirs: plugins/hls-cabal-gild-plugin/src
@@ -203,7 +203,7 @@ library hls-cabal-gild-plugin
203203
-- The `hls-cabal-plugin` is needed for tests, as we need to install notification handlers
204204
test-suite hls-cabal-gild-plugin-tests
205205
import: defaults, pedantic, test-defaults, warnings
206-
if !flag(cabalgild) || !flag(cabal) || (impl(ghc > 9.11) && !flag(ignore-plugins-ghc-bounds))
206+
if !flag(cabalgild) || !flag(cabal)
207207
buildable: False
208208
type: exitcode-stdio-1.0
209209
hs-source-dirs: plugins/hls-cabal-gild-plugin/test

test/testdata/schema/ghc912/default-config.golden.json

+5
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020
"path": "cabal-fmt"
2121
}
2222
},
23+
"cabal-gild": {
24+
"config": {
25+
"path": "cabal-gild"
26+
}
27+
},
2328
"cabalHaskellIntegration": {
2429
"globalOn": true
2530
},

test/testdata/schema/ghc912/vscode-extension-schema.golden.json

+6
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@
1111
"scope": "resource",
1212
"type": "string"
1313
},
14+
"haskell.plugin.cabal-gild.config.path": {
15+
"default": "cabal-gild",
16+
"markdownDescription": "Set path to 'cabal-gild' executable",
17+
"scope": "resource",
18+
"type": "string"
19+
},
1420
"haskell.plugin.cabal.codeActionsOn": {
1521
"default": true,
1622
"description": "Enables cabal code actions",

0 commit comments

Comments
 (0)