Skip to content
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

Different strategy about parsing NotificationMessage #508

Closed
July541 opened this issue Aug 1, 2023 · 2 comments · Fixed by #509
Closed

Different strategy about parsing NotificationMessage #508

July541 opened this issue Aug 1, 2023 · 2 comments · Fixed by #509

Comments

@July541
Copy link
Contributor

July541 commented Aug 1, 2023

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

Does it intentionally?

/cc @michaelpj

master:

instance (FromJSON (MessageParams m), FromJSON (SMethod m)) => FromJSON (TNotificationMessage m) where
parseJSON = genericParseJSON lspOptions

older:

instance (FromJSON (MessageParams m), FromJSON (SMethod m)) => FromJSON (NotificationMessage m) where
parseJSON = genericParseJSON lspOptions . addNullField "params"

@michaelpj
Copy link
Collaborator

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
Copy link
Contributor Author

July541 commented Aug 2, 2023

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 haskell/vscode-haskell#920, it still exists but irrelated to this.

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 a pull request may close this issue.

2 participants