haskell / lsp

Haskell library for the Microsoft Language Server Protocol
360 stars 89 forks source link

HLS reports `LSP: no handler for: SMethod_SetTrace` #501

Closed July541 closed 1 year ago

July541 commented 1 year ago

After upgrading to HLS shipped with lsp-2.0, I often see this.

I've checked the log but haven't found any info.

image

michaelpj commented 1 year ago

Okay, so what's going on here? Presumably we're being sent a $/setTrace notification by the client, and we don't have a handler for it. This is fine: there is no capability for these methods, you're just allowed to ignore such calls if you want. Probably lsp is being too picky about them.

I'm not sure what changed here, though.

michaelpj commented 1 year ago

Looks like https://github.com/haskell/lsp/blob/master/lsp/src/Language/LSP/Server/Processing.hs#L409 is supposed to handle it but isn't.

michaelpj commented 1 year ago

I think those methods used to be custom methods but now aren't, hence that has stopped working. Might need a bit of fiddling to make it work nicely.

July541 commented 1 year ago

https://github.com/haskell/lsp/blob/master/lsp/src/Language/LSP/Server/Processing.hs#L409

Something is wrong here, we just need to handle them correctly.

michaelpj commented 1 year ago

working on it