Fix crash in JSON/HTML LSP servers when initializationOptions are not provided#107775
Fix crash in JSON/HTML LSP servers when initializationOptions are not provided#107775aeschli merged 2 commits intomicrosoft:masterfrom apexskier:handle-missing-initialization-options
Conversation
|
Looks good! Let me know whet the PR is ready (it's still marked as draft) |
|
I think it's ready, I was just waiting for the build (and went off doing other things) |
|
Thanks @apexskier ! |
|
Thanks for merging, does anyone know what the publishing schedule/process for this package is? (Asking because it doesn't seem to be published on the same cadence as vscode itself. The last version was published 7 months ago, so three are quite a few pending changes) |
|
It's done on request :-) |
|
Dang, there's a crashing issue on startup with the new release due to bad file references. I saw this locally as well, but fixed it locally as I thought it was due to some magic happening at release time to make this cross platform. #107949 I'll see what I can find |
A bug hasn't been filed, but this somewhat relates to #72124.
I'm using the VSCode json language server with another LSP client (Nova.app), and am seeing crashes in the server because it's assuming the initialization request contains
initializationOptions. The spec says they're optional and there's some handling of them as optional, so I think this is just and oversight and a clear bug.I've gone through usages of
initializationOptionsfor the JSON, CSS, and HTML servers and updated all of them to consistently treat them as optional.I've tested this manually with my Nova extension. I did not see any unit tests related to this functionality to add to, and I think it's a minimal enough change that I'm not planning to add any.