Rust-analyser error initialising in VSCodium

Since its version of September 7 (the version of August 31 still works fine), rust-analyser seems to error in VSCodium when initialising with the following error repeated 5 times (at least on my system).

The automatic download of rust-analyser didn't work when installing the add-on, so I downloaded it manually. In previous versions it did work however when manually installed and included in $PATH. It seems strange rust-analyser would suddenly error on all installations of VSCodium, but I haven't change its settings all that much either.

Does anybody know how to proceed debugging this issue?

Failed to deserialize InitializeParams: missing field `requests`; 
{
    "capabilities": {
        "experimental": {
            "codeActionGroup": true,
            "hoverActions": true,
            "resolveCodeAction": true,
            "snippetTextEdit": true,
            "statusNotification": true
        },
        "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"
                    ],
                    "insertReplaceSupport": true,
                    "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
                    ]
                },
                "tagSupport": {
                    "valueSet": [
                        1
                    ]
                }
            },
            "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": {
                "complexDiagnosticCodeSupport": true,
                "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",
                    "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
                    ]
                },
                "tagSupport": {
                    "valueSet": [
                        1
                    ]
                }
            },
            "workspaceEdit": {
                "documentChanges": true,
                "failureHandling": "textOnlyTransactional",
                "resourceOperations": [
                    "create",
                    "rename",
                    "delete"
                ]
            },
            "workspaceFolders": true
        }
    },
    "clientInfo": {
        "name": "vscode",
        "version": "1.49.3"
    },
    "initializationOptions": {
        "callInfo": {
            "full": true
        },
        "cargo": {
            "allFeatures": false,
            "features": [],
            "loadOutDirsFromCheck": true,
            "noDefaultFeatures": false,
            "target": null
        },
        "cargoRunner": null,
        "checkOnSave": {
            "allFeatures": null,
            "allTargets": true,
            "command": "check",
            "enable": true,
            "extraArgs": [],
            "features": null,
            "overrideCommand": null
        },
        "completion": {
            "addCallArgumentSnippets": true,
            "addCallParenthesis": true,
            "postfix": {
                "enable": true
            }
        },
        "debug": {
            "engine": "auto",
            "engineSettings": {},
            "openDebugPane": true,
            "sourceFileMap": {
                "/rustc/<id>": "${env:USERPROFILE}/.rustup/toolchains/<toolchain-id>/lib/rustlib/src/rust"
            }
        },
        "diagnostics": {
            "enable": true,
            "warningsAsHint": [],
            "warningsAsInfo": []
        },
        "files": {
            "exclude": [],
            "watcher": "client"
        },
        "hoverActions": {
            "debug": true,
            "enable": true,
            "gotoTypeDef": true,
            "implementations": true,
            "run": true
        },
        "inlayHints": {
            "chainingHints": true,
            "enable": true,
            "maxLength": 20,
            "parameterHints": true,
            "typeHints": true
        },
        "lens": {
            "debug": true,
            "enable": true,
            "implementations": true,
            "run": true
        },
        "linkedProjects": null,
        "lruCapacity": null,
        "notifications": {
            "cargoTomlNotFound": true
        },
        "procMacro": {
            "enable": false
        },
        "runnableEnv": null,
        "rustfmt": {
            "extraArgs": [],
            "overrideCommand": null
        },
        "serverPath": null,
        "trace": {
            "extension": true,
            "server": "off"
        },
        "updates": {
            "askBeforeDownload": false,
            "channel": "stable"
        },
        "withSysroot": true
    },
    "processId": 2096,
    "rootPath": "[path to cargo-powered project]",
    "rootUri": "file:///[path to cargo-powered project]",
    "trace": "off",
    "workspaceFolders": [
        {
            "name": "wetten",
            "uri": "file:///[path to cargo-powered project]"
        }
    ]
}

Please open an issue on the GitHub - rust-lang/rust-analyzer: A Rust compiler front-end for IDEs repo.

1 Like

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.

Thanks! Updating the extension fixes it indeed. Previously version 0.4.0-dev was installed (which is odd in hindsight, but the name and information page as shown in VSCodium were the same). Uninstalling and reinstalling fixed it as "no updates were found".

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.