Skip to content

Update plugin support table for GHC 9.12.2 #4552

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 9, 2025

Conversation

fendor
Copy link
Collaborator

@fendor fendor commented Apr 8, 2025

Demote hls-refactor-plugin to tier 2, as we regularly ship the initial GHC support without it.

Demote `hls-refactor-plugin` to tier 2, as we regularly ship the initial
GHC support without it.
@fendor fendor requested a review from michaelpj as a code owner April 8, 2025 09:52
@fendor fendor requested review from jhrcek and soulomoon April 8, 2025 13:59
Copy link
Collaborator

@jhrcek jhrcek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@maerten
Copy link

maerten commented Apr 9, 2025

I noticed hls-fourmolu-plugin is listed as not supported by GHC 9.12.2.

However in a GHC 9.12.2 project with stack, it is possible to run stack install fourmolu and run it from the commandline without any issue.

$ stack --version
Version 3.3.1, Git revision 62d1bdf099c8c30634208f76cb4444f9896e4336 aarch64 hpack-0.37.0
$ stack ghc -- --version
The Glorious Glasgow Haskell Compilation System, version 9.12.2

$ which fourmolu
$HOME/.local/bin/fourmolu
$ fourmolu --version
fourmolu 0.18.0.0
using ghc-lib-parser 9.12.2.20250320

The only change needed to be able to run stack install fourmolu was adding the following to stack.yaml:

extra-deps:
  - ghc-lib-parser-9.12.2.20250320

From VSCode (actually Windsurf), formatting with fourmolu via HLS indeed didn't work.

2025-04-09T07:17:41.514403Z | Warning | No plugin handles this "textDocument/formatting" request.
[Error - 9:17:41 AM] Request textDocument/formatting failed.
  Message: No plugins are available to handle this SMethod_TextDocumentFormatting request.
 Plugins installed for this method, but not available to handle this request are:
cabal-fmt is not the formatting provider (fourmolu) you chose in your config.
  Code: -32601 

Unfortunately I using the external formatter in HLS doesn't work.

image
2025-04-09T07:24:36.976046Z | Warning | No plugin handles this "textDocument/formatting" request.
[Error - 9:24:36 AM] Request textDocument/formatting failed.
  Message: No plugins are available to handle this SMethod_TextDocumentFormatting request.
 Plugins installed for this method, but not available to handle this request are:
cabal-fmt is not the formatting provider (fourmolu) you chose in your config.
  Code: -32601 
2025-04-09T07:25:21.024204Z | Info | Live bytes: 201.67MB Heap size: 1050.67MB
2025-04-09T07:26:21.025567Z | Info | Live bytes: 201.67MB Heap size: 1050.67MB

But perhaps that is some misconfiguration on my end.

Just thought I would share, since at least fourmolu seems to be compatible with this GHC version :)

@fendor
Copy link
Collaborator Author

fendor commented Apr 9, 2025

@maerten That's good to know, thanks!
This table is supposed to show the status quo! Right now, hls-fourmolu-plugin isn't supported, so that's why the table reflects it.

@fendor fendor merged commit 53bf92c into haskell:master Apr 9, 2025
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants