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

Serialization issue with 0.19.8 update #1023

Closed
andyleejordan opened this issue Sep 18, 2023 · 4 comments
Closed

Serialization issue with 0.19.8 update #1023

andyleejordan opened this issue Sep 18, 2023 · 4 comments

Comments

@andyleejordan
Copy link
Contributor

andyleejordan commented Sep 18, 2023

Hi there @david-driscoll et. al.,

I'm attempting to update the PowerShell extension's server to 0.19.8, and managed to get it building again in PowerShell/PowerShellEditorServices#2079, but per the last commit in that PR I can't get the server to initialize as there's a serialization error:

[Error - 4:53:23 PM] OmniSharp.Extensions.JsonRpc.DefaultRequestInvoker: Failed to handle request initialize 0 - Newtonsoft.Json.JsonSerializationException: Error converting value True to type 'OmniSharp.Extensions.LanguageServer.Protocol.Supports`1[OmniSharp.Extensions.LanguageServer.Protocol.Client.Capabilities.SemanticTokensCapabilityRequestRange]'. Path 'textDocument.semanticTokens.requests.range', line 1, position 4679.

 ---> System.ArgumentException: Could not cast or convert from System.Boolean to OmniSharp.Extensions.LanguageServer.Protocol.Supports`1[OmniSharp.Extensions.LanguageServer.Protocol.Client.Capabilities.SemanticTokensCapabilityRequestRange].

That Range type is BooleanOr<SemanticTokensCapabilityRequestRange> so like, true should work. I also tried new SemanticTokensCapabilityRequestRange() { } per what I saw in David's code here: https://github.com/david-driscoll/dotnet-conf-2020/blob/1a73d216cc179aaf516900e5259ab3a106b3fd6d/server/TokenProvider.cs#L33

That still didn't work, so I think it's complaining about a boolean coming over the wire from the client...butI can't find anything client-side to change, and even if I did, shouldn't it work with true like it has in the past given that BooleanOr type?

@TheFabFab
Copy link

I'm experiencing the same issue after the upgrade...

@andyleejordan
Copy link
Contributor Author

Well glad to know it's not just me!

@JoeRobich
Copy link
Member

This issue should be resolved by #1025 and the fix is in the 0.19.9 release.

@andyleejordan
Copy link
Contributor Author

Confirmed resolved, thanks @JoeRobich!

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

No branches or pull requests

3 participants