-
Notifications
You must be signed in to change notification settings - Fork 182
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
don't send params for requests/notifications that don't expect them #2240
Conversation
Not sure about that; there are also many other occurrences in the specs where
is used for a response description. And in this case it means that |
There is this schema generated from the LSP spec that seems to confirm that those should not have params because it's not specified for those:
The So yeah, it looks like this change is correct and the textual spec is just not very precise and consistent. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the ones in the shutdown request and exit notification aren’t supposed to be there. The ones in the diagnostic-related requests, I don’t know, and may need more clarification in the spec.
It was clarified in microsoft/language-server-protocol#1725 (comment) Not sure which diagnostic-related requests do you mean though. The one I've mentioned was for example the server-initiated |
I guess this could be problematic for requests/notifications that we initiate and that are allowed to take a null value. In that case we would not send |
Rome returns an error response if we include
params: null
in theshutdown
request:Spec says that the
shutdown
request and theexit
notification haveparams: void
which I guess means that the property should not be set.params
is an optional property in the spec so this is valid per spec:In the spec there are some server-initiated requests like
workspace/codeLens/refresh
that haveparams: none
specified. I wonder if that means that server is expected to setnull
for those or it's fine to also not set the property at all. But that's not strictly related to our issue.