Stream: t-compiler/rust-analyzer

Topic: breaking changes to lsp-server


Poliorcetics (Nov 22 2020 at 15:31, on Zulip):

Hello !
I made a PR with breaking changes to lsp-server which means I cannot update rust-analyzer to show it works before the new version is published on crates.io (if the PR is accepted), should I just ensure it works locally with a path dependency ?

Florian Diebold (Nov 22 2020 at 18:04, on Zulip):

You could make the PR with a git dependency. I don't know about your change though; in general the client should be assumed to work correctly, and it doesn't make sense to make the server resilient against bad messages. It can even be better if it crashes early since you might otherwise miss bugs.

I think in your particular case, lsp-types might be wrong though? According to https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_didSave, the textDocument field should be a TextDocumentIdentifier which doesn't have a version field, but in lsp-types it's a VersionedTextDocumentIdentifier

Poliorcetics (Nov 22 2020 at 18:51, on Zulip):

I’ll see about changing that later to see if it fixes the problem for me

Jeremy Kolb (Nov 23 2020 at 16:22, on Zulip):

For those silent lurkers out there it looks like the spec was reverted and @Poliorcetics made an awesome PR to go with it: https://github.com/gluon-lang/lsp-types/pull/188

Jeremy Kolb (Nov 24 2020 at 14:03, on Zulip):

merged

Last update: Jul 29 2021 at 08:30UTC