emacs-lsp / lsp-haskell

lsp-mode :heart: haskell
https://emacs-lsp.github.io/lsp-haskell
GNU General Public License v3.0
227 stars 56 forks source link

Retrie doesn’t work #128

Closed bradrn closed 2 years ago

bradrn commented 3 years ago

When I try to apply a code action such as ‘Unfold’ or ‘Fold’, I get the following message:

LSP :: Please open an issue in lsp-mode for implementing `11160:retrie:retrieCommand'.

(error "Not enough arguments for format string")

(Sorry if this is the wrong place to report this issue. I’m assuming it’s not the responsibility of lsp-mode to implement Retrie support, and it certainly doesn’t look like HLS is the problem here.)

michaelpj commented 2 years ago

I think this error message is misleading: the second part is an error from HLS, so there's a format string bug somewhere.

bradrn commented 2 years ago

@michaelpj So then should I report this in https://github.com/haskell/haskell-language-server?

michaelpj commented 2 years ago

Yeah I think so. Could also be worth looking at your HLS log when it happens.

bradrn commented 2 years ago

@michaelpj I tried taking a log, this seems to be the relevant section:

[Trace - 06:55:01 PM] Received response 'workspace/executeCommand - (95)' in 0ms.
Result: {
  "code": -32602,
  "message": "error while parsing args for retrieCommand in plugin retrie: expected Bool, but encountered Null\narg = Object (fromList [(\"description\",String \"Unfold wSheet\"),(\"originatingFile\",String \"file:///c%3A/Users/bradn/Documents/Spreadsheet/supercell/src/Main.hs\"),(\"restrictToOriginatingFile\",Null),(\"rewrites\",Array [Object (fromList [(\"contents\",String \"Main.wSheet\"),(\"tag\",String \"Unfold\")])])])"
}
michaelpj commented 2 years ago

Definitely sounds like a HLS issue, then!