Skip to content

Conversation

@kjeremy
Copy link
Contributor

@kjeremy kjeremy commented Dec 9, 2020

@kjeremy kjeremy marked this pull request as ready for review December 17, 2020 16:34
@kjeremy
Copy link
Contributor Author

kjeremy commented Dec 17, 2020

bors r+

@matklad
Copy link
Contributor

matklad commented Dec 17, 2020

Finally! I really like stuff in 3.16!

@bors
Copy link
Contributor

bors bot commented Dec 17, 2020

@bors bors bot merged commit 4368a3b into rust-lang:master Dec 17, 2020
@kjeremy kjeremy deleted the new-lsp branch December 17, 2020 16:44
@matklad
Copy link
Contributor

matklad commented Dec 17, 2020

huh, seems like this broke something?

[Info  - 8:22:06 PM] Connection to server got closed. Server will restart.
Failed to deserialize InitializeParams: invalid type: boolean `true`, expected struct ChangeAnnotationWorkspaceEditClientCapabilities; {"processId":20923,"clientInfo":{"name":"vscode","version":"1.51.1"},"locale":"en-us","rootPath":"/home/matklad/projects/rust-analyzer","rootUri":"file:///home/matklad/projects/rust-analyzer","capabilities":{"workspace":{"applyEdit":true,"workspaceEdit":{"documentChanges":true,"resourceOperations":["create","rename","delete"],"failureHandling":"textOnlyTransactional","normalizesLineEndings":true,"changeAnnotationSupport":true},"didChangeConfiguration":{"dynamicRegistration":true},"didChangeWatchedFiles":{"dynamicRegistration":true},"symbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"tagSupport":{"valueSet":[1]}},"codeLens":{"refreshSupport":true},"executeCommand":{"dynamicRegistration":true},"configuration":true,"workspaceFolders":true,"semanticTokens":{"refreshSupport":true}},"textDocument":{"publishDiagnostics":{"relatedInformation":true,"versionSupport":false,"tagSupport":{"valueSet":[1,2]},"codeDescriptionSupport":true,"dataSupport":true},"synchronization":{"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":true,"contextSupport":true,"completionItem":{"snippetSupport":true,"commitCharactersSupport":true,"documentationFormat":["markdown","plaintext"],"deprecatedSupport":true,"preselectSupport":true,"tagSupport":{"valueSet":[1]},"insertReplaceSupport":true,"resolveSupport":{"properties":["documentation","detail","additionalTextEdits"]},"insertTextModeSupport":{"valueSet":[1,2]}},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]}},"hover":{"dynamicRegistration":true,"contentFormat":["markdown","plaintext"]},"signatureHelp":{"dynamicRegistration":true,"signatureInformation":{"documentationFormat":["markdown","plaintext"],"parameterInformation":{"labelOffsetSupport":true},"activeParameterSupport":true},"contextSupport":true},"definition":{"dynamicRegistration":true,"linkSupport":true},"references":{"dynamicRegistration":true},"documentHighlight":{"dynamicRegistration":true},"documentSymbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"hierarchicalDocumentSymbolSupport":true,"tagSupport":{"valueSet":[1]},"labelSupport":true},"codeAction":{"dynamicRegistration":true,"isPreferredSupport":true,"disabledSupport":true,"dataSupport":true,"resolveSupport":{"properties":["edit"]},"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"honorsChangeAnnotations":false},"codeLens":{"dynamicRegistration":true},"formatting":{"dynamicRegistration":true},"rangeFormatting":{"dynamicRegistration":true},"onTypeFormatting":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true,"prepareSupport":true,"prepareSupportDefaultBehavior":true,"honorsChangeAnnotations":true},"documentLink":{"dynamicRegistration":true,"tooltipSupport":true},"typeDefinition":{"dynamicRegistration":true,"linkSupport":true},"implementation":{"dynamicRegistration":true,"linkSupport":true},"colorProvider":{"dynamicRegistration":true},"foldingRange":{"dynamicRegistration":true,"rangeLimit":5000,"lineFoldingOnly":true},"declaration":{"dynamicRegistration":true,"linkSupport":true},"selectionRange":{"dynamicRegistration":true},"callHierarchy":{"dynamicRegistration":true},"semanticTokens":{"dynamicRegistration":true,"tokenTypes":["namespace","type","class","enum","interface","struct","typeParameter","parameter","variable","property","enumMember","event","function","member","macro","keyword","modifier","comment","string","number","regexp","operator"],"tokenModifiers":["declaration","definition","readonly","static","deprecated","abstract","async","modification","documentation","defaultLibrary"],"formats":["relative"],"requests":{"range":true,"full":{"delta":true}},"multilineTokenSupport":false,"overlappingTokenSupport":false},"onTypeRename":{"dynamicRegistration":true}},"window":{"showMessage":{"messageActionItem":{"additionalPropertiesSupport":true}},"showDocument":{"support":true},"workDoneProgress":true},"general":{"regularExpressions":{"engine":"ECMAScript","version":"ES2020"},"markdown":{"parser":"marked","version":"0.6.2"}},"experimental":{"snippetTextEdit":true,"codeActionGroup":true,"hoverActions":true,"statusNotification":true}},"initializationOptions":{"cargoRunner":null,"runnableEnv":null,"inlayHints":{"enable":true,"chainingHints":true,"maxLength":null,"parameterHints":true,"typeHints":true},"updates":{"channel":"stable","askBeforeDownload":true},"serverPath":null,"trace":{"server":"off","extension":false},"debug":{"engine":"auto","sourceFileMap":{"/rustc/<id>":"${env:USERPROFILE}/.rustup/toolchains/<toolchain-id>/lib/rustlib/src/rust"},"openDebugPane":false,"engineSettings":{}},"assist":{"importMergeBehaviour":"full","importPrefix":"plain"},"callInfo":{"full":false},"cargo":{"autoreload":true,"allFeatures":false,"features":[],"loadOutDirsFromCheck":false,"noDefaultFeatures":false,"target":null,"noSysroot":false},"checkOnSave":{"enable":false,"allFeatures":null,"allTargets":true,"command":"check","noDefaultFeatures":null,"target":null,"extraArgs":[],"features":null,"overrideCommand":null},"completion":{"addCallArgumentSnippets":false,"addCallParenthesis":true,"postfix":{"enable":true},"autoimport":{"enable":true}},"diagnostics":{"enable":true,"enableExperimental":true,"disabled":[],"warningsAsHint":[],"warningsAsInfo":[]},"files":{"watcher":"client"},"hoverActions":{"debug":true,"enable":true,"gotoTypeDef":true,"implementations":true,"run":true,"linksInHover":true},"lens":{"debug":true,"enable":true,"implementations":true,"run":true,"methodReferences":false},"linkedProjects":[],"lruCapacity":null,"notifications":{"cargoTomlNotFound":true},"procMacro":{"enable":false},"runnables":{"overrideCargo":null,"cargoExtraArgs":[]},"rustcSource":null,"rustfmt":{"extraArgs":[],"overrideCommand":null}},"trace":"off","workspaceFolders":[{"uri":"file:///home/matklad/projects/rust-analyzer","name":"rust-analyzer"}]}

@matklad
Copy link
Contributor

matklad commented Dec 17, 2020

Ok, so it works if I upgrade the version of extensions. But this still feels wrong.

Either the protocol is not backwards compatible, or lsp-types is overly strict somewhere. We should fix this before the next release ideally...

@kjeremy
Copy link
Contributor Author

kjeremy commented Dec 17, 2020

I think what you're hitting is the difference between two proposed APIs, the latter of which became final. Originally that was a bool param but got changed to an object right before release. That's why there's no backwards guarantee there in the protocol.

@matklad
Copy link
Contributor

matklad commented Dec 17, 2020

Huh... Still seems like a good idea to not fail over this in lsp-types. The will definitelly be a bunch of vscode sending us bools, and maybe some other editors as welll.

@matklad
Copy link
Contributor

matklad commented Dec 17, 2020

(specifically because we now require vscode 15.2, so 15.1 users will be stuck with an older extensions, and will get this bewildering error upon update. Don't ask me how I know that :P )

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

Successfully merging this pull request may close these issues.

2 participants