-
Notifications
You must be signed in to change notification settings - Fork 45
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
0.28.8: malformed JSON response to initialize
message
#108
Comments
Would you be able to provide me a full log of requests / responses up until that point? I've just added TCP support, so this will now be easier for me to test out on the command line. Note: this may be an issue with pygls; I don't believe jedi-language-server does anything special with the initialize response. If this turns out to be the case, would you be able to open an issue in that repo and link to this one? |
This is certainly one for pygls:
I expect that the right fix is to rework the pygls code so that it only explicitly sets these fields when it has a value to set them to, eg perhaps they want something like def _provider_options(self, field, feature, default=True):
if feature in self.features:
value = self.feature_options.get(feature, default)
setattr(self.server_cap, field, value) which is certainly uglier, but works better. (An alternative try would be to |
pygls fix is now released in their 0.10.3 |
@siegel has this been resolved in 0.10.3? That version is compatible with the latest release of jedi-language-server so you can test it right now! |
@pappasam Yes! It appears to be resolved; I'm not seeing any |
Using 0.28.8, the JSON that comes back from an
initialize
message looks like this:The
null
values fordeclarationProvider
and others aren't correct. According to the spec, those values should betrue
orfalse
, andnull
isn't translatable to a Boolean.Because those keys are optional, it may be better to omit them entirely rather than reporting
null
; but if that's not an option,false
is probably a better choice.This appears to be a regression from previous versions, which omitted those keys.
The text was updated successfully, but these errors were encountered: