Fails to provide Quick Fix(es)
Your environment
- Which OS do you use? macOS Monterey 12.5.1
- Which version of GHC do you use and how did you install it? All installed via
ghcup, GHC-9.2.4 and 9.4.2 - How is your project built (alternative: link to the project)? Via Cabal-3.8.1.0
- Which LSP client (editor/plugin) do you use? VS Codium+vscode-haskell
- Which version of HLS do you use and how did you install it? master
ghcup compile his --git-ref master --ghc 9.4.2
ghcup compile his --git-ref master --ghc 9.2.4
Have you configured HLS in any way (especially: a hie.yaml file)?
cradle:
cabal:
- path: "src"
component: "lib:stepic-tests"
- path: "app/Main.hs"
component: "stepic-tests:exe:stepic-tests-exe"
- path: "app/Paths_stepic_tests.hs"
component: "stepic-tests:exe:stepic-tests-exe"
- path: "test"
component: "stepic-tests:test:stepic-tests-test"
- path: "app/MaybeDemo.hs"
component: "stepic-tests:exe:maybe-demo"
- path: "app/Paths_stepic_tests.hs"
component: "stepic-tests:exe:maybe-demo"
Steps to reproduce
This happens occasionally with GHC-9.2.4, and always with 9.4.2.
Open .hs file in VS Code, edit the source to create "Redundant bracket" situation. E.g.:
failIndic :: [Maybe a] -> Bool
failIndic = (any isNothing)
Expected behaviour
In the error/warning popup, last line: clickable "View Problem" and clickable "Quick Fix... (Command .)"
Actual behaviour
In the error/warning popup, last line: clickable "View Problem" and "No quick fixes available"
P.S. I have screenshots, but GitHub decided to deny me the ability to upload them this time. ;-)
Do you get the hints from hlint if you run hlint on the file directly?
hls-hlint-plugin is not supported for GHC 9.4, so that will explain the behaviour for that version.
Do you get the hints from hlint if you run hlint on the file directly?
Not sure. I do get suggestions, like
$ hlint Lexer.hs
Lexer.hs:19:14-28: Suggestion: Redundant bracket
Found:
(all isDigit s)
Perhaps:
all isDigit s
1 hint
$
$ hlint --version
HLint v3.3.6, (C) Neil Mitchell 2006-2021
hls-hlint-pluginis not supported for GHC 9.4, so that will explain the behaviour for that version.
Could you clarify please - not supported yet, or GHC starting with 9.4.x stops supporting hls-hlint-plugin?
If the latter - does it mean that "Quick Fix..." capability will be lost (it's not crucial, but very convenient), or something else is coming to fill that gap?
It is not supported yet. We are blocked on upstream hlint support for GHC 9.4.2
We are blocked on upstream
hlintsupport for GHC 9.4.2
Thank you for the explanation! Would you happen to know what's the expected/hoped/planned timeframe for having this resolved?
I went on the hlint issue tracker and looked for 9.4-related issues and it seems there are several (e.g. https://github.com/ndmitchell/hlint/issues/1413). So you can go look there if you're interested!
Resolved
@michaelpj thank you! (It would be nice to mention how it was resolved.)