vscode-rust icon indicating copy to clipboard operation
vscode-rust copied to clipboard

rust-analyzer crashes: Failed to deserialize InitializeParams: missing field `requests`

Open mleonhard opened this issue 4 years ago • 17 comments

Hi VSCode Rust Plugin Maintainers, Thanks for working on this tool. Because rls doesn't work for tokio, I'm trying out rust-analyzer. I had difficulty getting the plugin to work with recent versions of rust-analyzer. I'm filing this issue to let you know about the problem and also to help out other folks who run into it.

-Michael

  • Rust VSCode plugin 0.7.8
  • Rust beta toolchain
  • VSCode 1.49.0
  • MacOS 10.15.6

These versions of rust-analyzer crash:

  • nightly 7ba578a
  • 2020-09-14
  • 2020-09-07

rust-analyzer release 2020-08-31 works.

Example crash log messages: Failed to deserialize InitializeParams: missing field requests; {"capabilities":{"textDocument":{"callHierarchy":{"dynamicRegistration":true},"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"dynamicRegistration":true,"isPreferredSupport":true},"codeLens":{"dynamicRegistration":true},"colorProvider":{"dynamicRegistration":true},"completion":{"completionItem":{"commitCharactersSupport":true,"deprecatedSupport":true,"documentationFormat":["markdown","plaintext"],"preselectSupport":true,"snippetSupport":true,"tagSupport":{"valueSet":[1]}},"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]},"contextSupport":true,"dynamicRegistration":true},"declaration":{"dynamicRegistration":true,"linkSupport":true},"definition":{"dynamicRegistration":true,"linkSupport":true},"documentHighlight":{"dynamicRegistration":true},"documentLink":{"dynamicRegistration":true,"tooltipSupport":true},"documentSymbol":{"dynamicRegistration":true,"hierarchicalDocumentSymbolSupport":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]}},"foldingRange":{"dynamicRegistration":true,"lineFoldingOnly":true,"rangeLimit":5000},"formatting":{"dynamicRegistration":true},"hover":{"contentFormat":["markdown","plaintext"],"dynamicRegistration":true},"implementation":{"dynamicRegistration":true,"linkSupport":true},"onTypeFormatting":{"dynamicRegistration":true},"publishDiagnostics":{"relatedInformation":true,"tagSupport":{"valueSet":[1,2]},"versionSupport":false},"rangeFormatting":{"dynamicRegistration":true},"references":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true,"prepareSupport":true},"selectionRange":{"dynamicRegistration":true},"semanticTokens":{"dynamicRegistration":true,"tokenModifiers":["declaration","documentation","static","abstract","deprecated","async","readonly"],"tokenTypes":["comment","keyword","number","regexp","operator","namespace","type","struct","class","interface","enum","typeParameter","function","member","macro","variable","parameter","property","label"]},"signatureHelp":{"contextSupport":true,"dynamicRegistration":true,"signatureInformation":{"documentationFormat":["markdown","plaintext"],"parameterInformation":{"labelOffsetSupport":true}}},"synchronization":{"didSave":true,"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true},"typeDefinition":{"dynamicRegistration":true,"linkSupport":true}},"window":{"workDoneProgress":true},"workspace":{"applyEdit":true,"configuration":true,"didChangeConfiguration":{"dynamicRegistration":true},"didChangeWatchedFiles":{"dynamicRegistration":true},"executeCommand":{"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]}},"workspaceEdit":{"documentChanges":true,"failureHandling":"textOnlyTransactional","resourceOperations":["create","rename","delete"]},"workspaceFolders":true}},"clientInfo":{"name":"vscode","version":"1.49.0"},"initializationOptions":{"path":null,"releaseTag":"2020-09-07"},"processId":5020,"rootPath":"/Users/user/1","rootUri":"file:///Users/user/1","trace":"off","workspaceFolders":[{"name":"1","uri":"file:///Users/user/1"},{"name":"2","uri":"file:///Users/user/2"},{"name":"3","uri":"file:///Users/user/3"},{"name":"4","uri":"file:///Users/user/4"},{"name":"5","uri":"file:///Users/user/5"},{"name":"6","uri":"file:///Users/user/6"}]} [Error - 6:42:10 PM] Connection to server got closed. Server will not be restarted.

Related:

  • https://github.com/rust-analyzer/rust-analyzer/issues/5986
  • https://github.com/rust-analyzer/rust-analyzer/issues/5983

mleonhard avatar Sep 15 '20 02:09 mleonhard

rust-analyzer release 2020-08-31 is flaky. It just stopped working in my VSCode installation. It does code completion and shows documentation popups, but stopped showing compiler errors and warnings. Restarting VSCode has no effect. rustup update did not fix it.

Is there any way to use VSCode to edit code that uses tokio? Is everything broken or is there a particular combination of versions of VSCode, VSCode Rust Extension, RLS/rust-analyzer, and rust-analyzer that just work?

mleonhard avatar Sep 15 '20 07:09 mleonhard

VSCode + just rust-analyzer works for me on MacOS.

AriusX7 avatar Sep 15 '20 23:09 AriusX7

The same problem on Windows

Calvin-he avatar Sep 16 '20 07:09 Calvin-he

@Calvin-he, @mleonhard if you're using the Rust extension, I would recommend switching to the rust-analyzer one. The rust-analyzer support in the former is a bit outdated, and users seem to run into a lot of issues with it.

lnicola avatar Sep 17 '20 10:09 lnicola

I think this is fixed by updating the version of the rust-analyzer VS Code plugin. I think this is an upstream issue, but I haven't investigated this further: https://github.com/microsoft/language-server-protocol/commit/bdf50a1ae6fd06c4b1fbe142ac3e2c84fdccc4c5#r43152883.

matklad avatar Oct 12 '20 07:10 matklad

I had the same "Failed to deserialize initializeParams ..." error from rust-analyzer. VS Code reported that it crashed "5 times in the last 3 minutes" whenever I open a new .rs file.

I had both the (starred) "Rust" extension v0.7.8 installed on the remote host (and rust-analyzer set as the engine) and also the rust-analyzer extension. Disabling the "Rust" extension made the problem go away. It was difficult to tell which rust-analyzer was crashing; apparently it was the one installed by the "Rust" extension, not the "rust-analyzer" extension.

For posterity, I'm running: VS Code: 1.50.1 (on macOS 10.15.7, but connecting to remote host running Ubuntu 20.04) rust-analyzer extension: v0.2.344

benjaminfjones avatar Oct 17 '20 17:10 benjaminfjones

Wow, thanks @benjaminfjones, that's an interesting failure mode!

matklad avatar Oct 17 '20 17:10 matklad

I had the same "Failed to deserialize initializeParams ..." error from rust-analyzer. VS Code reported that it crashed "5 times in the last 3 minutes" whenever I open a new .rs file.

I had both the (starred) "Rust" extension v0.7.8 installed on the remote host (and rust-analyzer set as the engine) and also the rust-analyzer extension. Disabling the "Rust" extension made the problem go away. It was difficult to tell which rust-analyzer was crashing; apparently it was the one installed by the "Rust" extension, not the "rust-analyzer" extension.

For posterity, I'm running: VS Code: 1.50.1 (on macOS 10.15.7, but connecting to remote host running Ubuntu 20.04) rust-analyzer extension: v0.2.344

Thanks @benjaminfjones, disabling "Rust" extension did the trick! (for the same versions).

Skorbuth avatar Oct 24 '20 17:10 Skorbuth

If you disable the Rust extension, how does code completion work?

abhyuditjain avatar Nov 11 '20 04:11 abhyuditjain

@abhyuditjain rust-analyzer does its own code completion. It's a complete replacement for the Rust extension.

Herohtar avatar Nov 11 '20 04:11 Herohtar

I have the same problem (see log below): I disabled the rust-analyzer extension, rls works fine.

Failed to deserialize InitializeParams: missing field `requests`; {"capabilities":{"textDocument":{"callHierarchy":{"dynamicRegistration":true},"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"dynamicRegistration":true,"isPreferredSupport":true},"codeLens":{"dynamicRegistration":true},"colorProvider":{"dynamicRegistration":true},"completion":{"completionItem":{"commitCharactersSupport":true,"deprecatedSupport":true,"documentationFormat":["markdown","plaintext"],"preselectSupport":true,"snippetSupport":true,"tagSupport":{"valueSet":[1]}},"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]},"contextSupport":true,"dynamicRegistration":true},"declaration":{"dynamicRegistration":true,"linkSupport":true},"definition":{"dynamicRegistration":true,"linkSupport":true},"documentHighlight":{"dynamicRegistration":true},"documentLink":{"dynamicRegistration":true,"tooltipSupport":true},"documentSymbol":{"dynamicRegistration":true,"hierarchicalDocumentSymbolSupport":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]}},"foldingRange":{"dynamicRegistration":true,"lineFoldingOnly":true,"rangeLimit":5000},"formatting":{"dynamicRegistration":true},"hover":{"contentFormat":["markdown","plaintext"],"dynamicRegistration":true},"implementation":{"dynamicRegistration":true,"linkSupport":true},"onTypeFormatting":{"dynamicRegistration":true},"publishDiagnostics":{"relatedInformation":true,"tagSupport":{"valueSet":[1,2]},"versionSupport":false},"rangeFormatting":{"dynamicRegistration":true},"references":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true,"prepareSupport":true},"selectionRange":{"dynamicRegistration":true},"semanticTokens":{"dynamicRegistration":true,"tokenModifiers":["declaration","documentation","static","abstract","deprecated","async","readonly"],"tokenTypes":["comment","keyword","number","regexp","operator","namespace","type","struct","class","interface","enum","typeParameter","function","member","macro","variable","parameter","property","label"]},"signatureHelp":{"contextSupport":true,"dynamicRegistration":true,"signatureInformation":{"documentationFormat":["markdown","plaintext"],"parameterInformation":{"labelOffsetSupport":true}}},"synchronization":{"didSave":true,"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true},"typeDefinition":{"dynamicRegistration":true,"linkSupport":true}},"window":{"workDoneProgress":true},"workspace":{"applyEdit":true,"configuration":true,"didChangeConfiguration":{"dynamicRegistration":true},"didChangeWatchedFiles":{"dynamicRegistration":true},"executeCommand":{"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]}},"workspaceEdit":{"documentChanges":true,"failureHandling":"textOnlyTransactional","resourceOperations":["create","rename","delete"]},"workspaceFolders":true}},"clientInfo":{"name":"vscode","version":"1.51.1"},"initializationOptions":{"path":null,"releaseTag":"nightly"},"processId":6058,"rootPath":"/home/volker/Sync/git/rust-bindgen","rootUri":"file:///home/volker/Sync/git/rust-bindgen","trace":"off","workspaceFolders":[{"name":"rust-bindgen","uri":"file:///home/volker/Sync/git/rust-bindgen"}]}
[Info  - 10:08:44 PM] Connection to server got closed. Server will restart.
Failed to deserialize InitializeParams: missing field `requests`; {"capabilities":{"textDocument":{"callHierarchy":{"dynamicRegistration":true},"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"dynamicRegistration":true,"isPreferredSupport":true},"codeLens":{"dynamicRegistration":true},"colorProvider":{"dynamicRegistration":true},"completion":{"completionItem":{"commitCharactersSupport":true,"deprecatedSupport":true,"documentationFormat":["markdown","plaintext"],"preselectSupport":true,"snippetSupport":true,"tagSupport":{"valueSet":[1]}},"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]},"contextSupport":true,"dynamicRegistration":true},"declaration":{"dynamicRegistration":true,"linkSupport":true},"definition":{"dynamicRegistration":true,"linkSupport":true},"documentHighlight":{"dynamicRegistration":true},"documentLink":{"dynamicRegistration":true,"tooltipSupport":true},"documentSymbol":{"dynamicRegistration":true,"hierarchicalDocumentSymbolSupport":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]}},"foldingRange":{"dynamicRegistration":true,"lineFoldingOnly":true,"rangeLimit":5000},"formatting":{"dynamicRegistration":true},"hover":{"contentFormat":["markdown","plaintext"],"dynamicRegistration":true},"implementation":{"dynamicRegistration":true,"linkSupport":true},"onTypeFormatting":{"dynamicRegistration":true},"publishDiagnostics":{"relatedInformation":true,"tagSupport":{"valueSet":[1,2]},"versionSupport":false},"rangeFormatting":{"dynamicRegistration":true},"references":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true,"prepareSupport":true},"selectionRange":{"dynamicRegistration":true},"semanticTokens":{"dynamicRegistration":true,"tokenModifiers":["declaration","documentation","static","abstract","deprecated","async","readonly"],"tokenTypes":["comment","keyword","number","regexp","operator","namespace","type","struct","class","interface","enum","typeParameter","function","member","macro","variable","parameter","property","label"]},"signatureHelp":{"contextSupport":true,"dynamicRegistration":true,"signatureInformation":{"documentationFormat":["markdown","plaintext"],"parameterInformation":{"labelOffsetSupport":true}}},"synchronization":{"didSave":true,"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true},"typeDefinition":{"dynamicRegistration":true,"linkSupport":true}},"window":{"workDoneProgress":true},"workspace":{"applyEdit":true,"configuration":true,"didChangeConfiguration":{"dynamicRegistration":true},"didChangeWatchedFiles":{"dynamicRegistration":true},"executeCommand":{"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]}},"workspaceEdit":{"documentChanges":true,"failureHandling":"textOnlyTransactional","resourceOperations":["create","rename","delete"]},"workspaceFolders":true}},"clientInfo":{"name":"vscode","version":"1.51.1"},"initializationOptions":{"path":null,"releaseTag":"nightly"},"processId":6058,"rootPath":"/home/volker/Sync/git/rust-bindgen","rootUri":"file:///home/volker/Sync/git/rust-bindgen","trace":"off","workspaceFolders":[{"name":"rust-bindgen","uri":"file:///home/volker/Sync/git/rust-bindgen"}]}
[Info  - 10:08:44 PM] Connection to server got closed. Server will restart.
Failed to deserialize InitializeParams: missing field `requests`; {"capabilities":{"textDocument":{"callHierarchy":{"dynamicRegistration":true},"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"dynamicRegistration":true,"isPreferredSupport":true},"codeLens":{"dynamicRegistration":true},"colorProvider":{"dynamicRegistration":true},"completion":{"completionItem":{"commitCharactersSupport":true,"deprecatedSupport":true,"documentationFormat":["markdown","plaintext"],"preselectSupport":true,"snippetSupport":true,"tagSupport":{"valueSet":[1]}},"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]},"contextSupport":true,"dynamicRegistration":true},"declaration":{"dynamicRegistration":true,"linkSupport":true},"definition":{"dynamicRegistration":true,"linkSupport":true},"documentHighlight":{"dynamicRegistration":true},"documentLink":{"dynamicRegistration":true,"tooltipSupport":true},"documentSymbol":{"dynamicRegistration":true,"hierarchicalDocumentSymbolSupport":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]}},"foldingRange":{"dynamicRegistration":true,"lineFoldingOnly":true,"rangeLimit":5000},"formatting":{"dynamicRegistration":true},"hover":{"contentFormat":["markdown","plaintext"],"dynamicRegistration":true},"implementation":{"dynamicRegistration":true,"linkSupport":true},"onTypeFormatting":{"dynamicRegistration":true},"publishDiagnostics":{"relatedInformation":true,"tagSupport":{"valueSet":[1,2]},"versionSupport":false},"rangeFormatting":{"dynamicRegistration":true},"references":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true,"prepareSupport":true},"selectionRange":{"dynamicRegistration":true},"semanticTokens":{"dynamicRegistration":true,"tokenModifiers":["declaration","documentation","static","abstract","deprecated","async","readonly"],"tokenTypes":["comment","keyword","number","regexp","operator","namespace","type","struct","class","interface","enum","typeParameter","function","member","macro","variable","parameter","property","label"]},"signatureHelp":{"contextSupport":true,"dynamicRegistration":true,"signatureInformation":{"documentationFormat":["markdown","plaintext"],"parameterInformation":{"labelOffsetSupport":true}}},"synchronization":{"didSave":true,"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true},"typeDefinition":{"dynamicRegistration":true,"linkSupport":true}},"window":{"workDoneProgress":true},"workspace":{"applyEdit":true,"configuration":true,"didChangeConfiguration":{"dynamicRegistration":true},"didChangeWatchedFiles":{"dynamicRegistration":true},"executeCommand":{"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]}},"workspaceEdit":{"documentChanges":true,"failureHandling":"textOnlyTransactional","resourceOperations":["create","rename","delete"]},"workspaceFolders":true}},"clientInfo":{"name":"vscode","version":"1.51.1"},"initializationOptions":{"path":null,"releaseTag":"nightly"},"processId":6058,"rootPath":"/home/volker/Sync/git/rust-bindgen","rootUri":"file:///home/volker/Sync/git/rust-bindgen","trace":"off","workspaceFolders":[{"name":"rust-bindgen","uri":"file:///home/volker/Sync/git/rust-bindgen"}]}
[Info  - 10:08:44 PM] Connection to server got closed. Server will restart.
Failed to deserialize InitializeParams: missing field `requests`; {"capabilities":{"textDocument":{"callHierarchy":{"dynamicRegistration":true},"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"dynamicRegistration":true,"isPreferredSupport":true},"codeLens":{"dynamicRegistration":true},"colorProvider":{"dynamicRegistration":true},"completion":{"completionItem":{"commitCharactersSupport":true,"deprecatedSupport":true,"documentationFormat":["markdown","plaintext"],"preselectSupport":true,"snippetSupport":true,"tagSupport":{"valueSet":[1]}},"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]},"contextSupport":true,"dynamicRegistration":true},"declaration":{"dynamicRegistration":true,"linkSupport":true},"definition":{"dynamicRegistration":true,"linkSupport":true},"documentHighlight":{"dynamicRegistration":true},"documentLink":{"dynamicRegistration":true,"tooltipSupport":true},"documentSymbol":{"dynamicRegistration":true,"hierarchicalDocumentSymbolSupport":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]}},"foldingRange":{"dynamicRegistration":true,"lineFoldingOnly":true,"rangeLimit":5000},"formatting":{"dynamicRegistration":true},"hover":{"contentFormat":["markdown","plaintext"],"dynamicRegistration":true},"implementation":{"dynamicRegistration":true,"linkSupport":true},"onTypeFormatting":{"dynamicRegistration":true},"publishDiagnostics":{"relatedInformation":true,"tagSupport":{"valueSet":[1,2]},"versionSupport":false},"rangeFormatting":{"dynamicRegistration":true},"references":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true,"prepareSupport":true},"selectionRange":{"dynamicRegistration":true},"semanticTokens":{"dynamicRegistration":true,"tokenModifiers":["declaration","documentation","static","abstract","deprecated","async","readonly"],"tokenTypes":["comment","keyword","number","regexp","operator","namespace","type","struct","class","interface","enum","typeParameter","function","member","macro","variable","parameter","property","label"]},"signatureHelp":{"contextSupport":true,"dynamicRegistration":true,"signatureInformation":{"documentationFormat":["markdown","plaintext"],"parameterInformation":{"labelOffsetSupport":true}}},"synchronization":{"didSave":true,"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true},"typeDefinition":{"dynamicRegistration":true,"linkSupport":true}},"window":{"workDoneProgress":true},"workspace":{"applyEdit":true,"configuration":true,"didChangeConfiguration":{"dynamicRegistration":true},"didChangeWatchedFiles":{"dynamicRegistration":true},"executeCommand":{"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]}},"workspaceEdit":{"documentChanges":true,"failureHandling":"textOnlyTransactional","resourceOperations":["create","rename","delete"]},"workspaceFolders":true}},"clientInfo":{"name":"vscode","version":"1.51.1"},"initializationOptions":{"path":null,"releaseTag":"nightly"},"processId":6058,"rootPath":"/home/volker/Sync/git/rust-bindgen","rootUri":"file:///home/volker/Sync/git/rust-bindgen","trace":"off","workspaceFolders":[{"name":"rust-bindgen","uri":"file:///home/volker/Sync/git/rust-bindgen"}]}
[Info  - 10:08:44 PM] Connection to server got closed. Server will restart.
Failed to deserialize InitializeParams: missing field `requests`; {"capabilities":{"textDocument":{"callHierarchy":{"dynamicRegistration":true},"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"dynamicRegistration":true,"isPreferredSupport":true},"codeLens":{"dynamicRegistration":true},"colorProvider":{"dynamicRegistration":true},"completion":{"completionItem":{"commitCharactersSupport":true,"deprecatedSupport":true,"documentationFormat":["markdown","plaintext"],"preselectSupport":true,"snippetSupport":true,"tagSupport":{"valueSet":[1]}},"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]},"contextSupport":true,"dynamicRegistration":true},"declaration":{"dynamicRegistration":true,"linkSupport":true},"definition":{"dynamicRegistration":true,"linkSupport":true},"documentHighlight":{"dynamicRegistration":true},"documentLink":{"dynamicRegistration":true,"tooltipSupport":true},"documentSymbol":{"dynamicRegistration":true,"hierarchicalDocumentSymbolSupport":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]}},"foldingRange":{"dynamicRegistration":true,"lineFoldingOnly":true,"rangeLimit":5000},"formatting":{"dynamicRegistration":true},"hover":{"contentFormat":["markdown","plaintext"],"dynamicRegistration":true},"implementation":{"dynamicRegistration":true,"linkSupport":true},"onTypeFormatting":{"dynamicRegistration":true},"publishDiagnostics":{"relatedInformation":true,"tagSupport":{"valueSet":[1,2]},"versionSupport":false},"rangeFormatting":{"dynamicRegistration":true},"references":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true,"prepareSupport":true},"selectionRange":{"dynamicRegistration":true},"semanticTokens":{"dynamicRegistration":true,"tokenModifiers":["declaration","documentation","static","abstract","deprecated","async","readonly"],"tokenTypes":["comment","keyword","number","regexp","operator","namespace","type","struct","class","interface","enum","typeParameter","function","member","macro","variable","parameter","property","label"]},"signatureHelp":{"contextSupport":true,"dynamicRegistration":true,"signatureInformation":{"documentationFormat":["markdown","plaintext"],"parameterInformation":{"labelOffsetSupport":true}}},"synchronization":{"didSave":true,"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true},"typeDefinition":{"dynamicRegistration":true,"linkSupport":true}},"window":{"workDoneProgress":true},"workspace":{"applyEdit":true,"configuration":true,"didChangeConfiguration":{"dynamicRegistration":true},"didChangeWatchedFiles":{"dynamicRegistration":true},"executeCommand":{"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]}},"workspaceEdit":{"documentChanges":true,"failureHandling":"textOnlyTransactional","resourceOperations":["create","rename","delete"]},"workspaceFolders":true}},"clientInfo":{"name":"vscode","version":"1.51.1"},"initializationOptions":{"path":null,"releaseTag":"nightly"},"processId":6058,"rootPath":"/home/volker/Sync/git/rust-bindgen","rootUri":"file:///home/volker/Sync/git/rust-bindgen","trace":"off","workspaceFolders":[{"name":"rust-bindgen","uri":"file:///home/volker/Sync/git/rust-bindgen"}]}
[Error - 10:08:44 PM] Connection to server got closed. Server will not be restarted.

Volker-Weissmann avatar Dec 02 '20 21:12 Volker-Weissmann

??

liuhangyu avatar Feb 03 '21 09:02 liuhangyu

??

Are you talking to me?

Volker-Weissmann avatar Feb 03 '21 10:02 Volker-Weissmann

@Volker-Weissmann did you disable the rust-analyzer extension, or the experimental rust-analyzer support in the vscode-rust? The latter is somewhat broken, but the standalone rust-analyzer extension should work.

lnicola avatar Feb 03 '21 10:02 lnicola

I don't know what I did 2 months ago. Currently, vscode.rust is "Built-in" and enabled, and matklad.rust-analyzer is installed and enabled. rust-lang.rust is disabled.

ps -ef | grep -i rls shows nothing. ps -ef shows that /home/volker/.config/Code - OSS/User/globalStorage/matklad.rust-analyzer/rust-analyzer-x86_64-unknown-linux-gnu is running.

I don't know if this was my configuration 2 months ago, but it seems to work (apart from an assertion failure in self.hl_range.range.contains_range(hl_range.range), crates/ide/src/syntax_highlighting/highlights.rs:42:9 , but I this is a different bug.).

Volker-Weissmann avatar Feb 03 '21 10:02 Volker-Weissmann

Currently, vscode.rust is "Built-in" and enabled, and matklad.rust-analyzer is installed and enabled. rust-lang.rust is disabled.

Then you're using rust-analyzer.

an assertion failure in self.hl_range.range.contains_range

That's probably https://github.com/rust-analyzer/rust-analyzer/issues/7299.

lnicola avatar Feb 03 '21 10:02 lnicola

Yes. But I don't know if this was my configuration for the last two months or not.

Volker-Weissmann avatar Feb 03 '21 10:02 Volker-Weissmann