Commit a5605c6
committed
Add option to enable/disable
Support for `.cabal` files was implemented in HLS 2.0.0.0.
But the vscode-haskell extension does not enable this Language Server
support, because it would break for older HLS binaries, as these were
unable to handle file updates for `.cabal` files.
To work-around, we had a pre-release of the vscode-haskell plugin, which
enabled support for `.cabal` plugins in an opt-in fashion.
It's been a while, and we want to enable language server support for
`.cabal` files unconditionally. There are still HLS binaries around that
can't handle `.cabal` files, but it much less.
For the unfortunate souls left behind with GHC versions such as 8.6.5,
we add a new vscode-haskell option:
haskell.supportCabalFiles
This option is `true` by default, but if set to `false` it will
unconditionally **disable** sending File Notifications for `.cabal`
files, which allows us to keep working for older HLS binaries.
This change would be difficult to test, and incur an, in my opinion,
unreasonable price on our CI times.
I manually tested the changes, by using HLS 1.8.0.0 (last released
binary for GHC 8.6.5) on a project with `haskell.supportCabalFiles` set
to `true` and `false` respectively.
HLS seemed to behave correctly, showing Diagnostics for Haskell files,
but not show any logs for `.cabal` files.
The only potential change in behaviour is that vscode-haskell now also
activates when a `.cabal` file has been opened. This may be overly eager to
some, but since no Haskell files are typechecked, the impact on memory
usage is negligible in my opinion..cabal file support1 parent 2805ff0 commit a5605c6
2 files changed
+21
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
237 | 243 | | |
238 | 244 | | |
239 | 245 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
208 | 211 | | |
209 | 212 | | |
210 | 213 | | |
| |||
253 | 256 | | |
254 | 257 | | |
255 | 258 | | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
256 | 267 | | |
257 | 268 | | |
258 | 269 | | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
264 | 274 | | |
265 | 275 | | |
266 | 276 | | |
| |||
0 commit comments