haskell / lsp

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

Different strategy about parsing `NotificationMessage` #508

Closed July541 closed 11 months ago

July541 commented 11 months ago

I just found generated model dropped addNullField for notification messages, which may be one of the causes of https://github.com/haskell/vscode-haskell/issues/920.

Does it intentionally?

/cc @michaelpj

master: https://github.com/haskell/lsp/blob/8ab6604fc7917c87379ff7198d43d78ba46d6026/lsp-types/src/Language/LSP/Protocol/Message/Types.hs#L111-L112

older: https://github.com/haskell/lsp/blob/596376af3c9dff902797ef11f16ba6d177a22890/lsp-types/src/Language/LSP/Types/Message.hs#L260-L261

michaelpj commented 11 months ago

Argh, I suspect this is indeed a regression. Sorry about that. I'll try to get a fix out and included in the next HLS. Do you know if this change fixes the issue you saw?

July541 commented 11 months ago

Do you know if this change fixes the issue you saw?

Thanks for the timely work! I compiled your fix and parsing failed doesn't appear more!

As for https://github.com/haskell/vscode-haskell/issues/920, it still exists but irrelated to this.