I am trying to install rust-analyzer on codium (ubuntu 20.04)
When I go to the extension store and click on install, the extension install then throw an error :
Cannot activate rust-analyzer: bootstrap error. See the logs in "OUTPUT > Rust Analyzer Client" (should open automatically). To enable verbose logs use { "rust-analyzer.trace.extension": true }
Here is the log with verbose output;
INFO [12/26/2021, 10:24:14 AM]: Extension version: 0.2.867
INFO [12/26/2021, 10:24:14 AM]: Using configuration {
cargoRunner: null,
runnableEnv: null,
inlayHints: {
enable: true,
smallerHints: true,
chainingHints: true,
maxLength: 25,
parameterHints: true,
typeHints: true,
hideNamedConstructorHints: false
},
updates: { channel: 'stable', askBeforeDownload: false },
server: { path: null, extraEnv: null },
trace: { server: 'off', extension: true },
debug: {
engine: 'auto',
sourceFileMap: {
'/rustc/<id>': '${env:USERPROFILE}/.rustup/toolchains/<toolchain-id>/lib/rustlib/src/rust'
},
openDebugPane: false,
engineSettings: {}
},
assist: {
importGranularity: 'crate',
importEnforceGranularity: false,
importPrefix: 'plain',
importGroup: true,
allowMergingIntoGlobImports: true
},
cache: { warmup: true },
callInfo: { full: true },
cargo: {
autoreload: true,
allFeatures: false,
unsetTest: [ 'core' ],
features: [],
runBuildScripts: true,
useRustcWrapperForBuildScripts: true,
noDefaultFeatures: false,
target: null,
noSysroot: false
},
checkOnSave: {
enable: true,
allFeatures: null,
allTargets: true,
command: 'check',
noDefaultFeatures: null,
target: null,
extraArgs: [],
features: null,
overrideCommand: null
},
completion: {
addCallArgumentSnippets: true,
addCallParenthesis: true,
snippets: {
'Arc::new': {
postfix: 'arc',
body: 'Arc::new(${receiver})',
requires: 'std::sync::Arc',
description: 'Put the expression into an `Arc`',
scope: 'expr'
},
'Rc::new': {
postfix: 'rc',
body: 'Rc::new(${receiver})',
requires: 'std::rc::Rc',
description: 'Put the expression into an `Rc`',
scope: 'expr'
},
'Box::pin': {
postfix: 'pinbox',
body: 'Box::pin(${receiver})',
requires: 'std::boxed::Box',
description: 'Put the expression into a pinned `Box`',
scope: 'expr'
},
Ok: {
postfix: 'ok',
body: 'Ok(${receiver})',
description: 'Wrap the expression in a `Result::Ok`',
scope: 'expr'
},
Err: {
postfix: 'err',
body: 'Err(${receiver})',
description: 'Wrap the expression in a `Result::Err`',
scope: 'expr'
},
Some: {
postfix: 'some',
body: 'Some(${receiver})',
description: 'Wrap the expression in an `Option::Some`',
scope: 'expr'
}
},
postfix: { enable: true },
autoimport: { enable: true },
autoself: { enable: true }
},
diagnostics: {
enable: true,
enableExperimental: true,
disabled: [],
remapPrefix: {},
warningsAsHint: [],
warningsAsInfo: []
},
experimental: { procAttrMacros: true },
files: { watcher: 'client', excludeDirs: [] },
highlightRelated: {
references: true,
exitPoints: true,
breakPoints: true,
yieldPoints: true
},
highlighting: { strings: true },
hover: { documentation: true, linksInHover: true },
hoverActions: {
debug: true,
enable: true,
gotoTypeDef: true,
implementations: true,
references: false,
run: true
},
joinLines: {
joinElseIf: true,
removeTrailingComma: true,
unwrapTrivialBlock: true,
joinAssignments: true
},
lens: {
debug: true,
enable: true,
implementations: true,
run: true,
methodReferences: false,
references: false,
enumVariantReferences: false,
forceCustomCommands: true
},
linkedProjects: [],
lruCapacity: null,
notifications: { cargoTomlNotFound: true },
procMacro: { enable: true, server: null },
runnables: { overrideCargo: null, cargoExtraArgs: [] },
rustcSource: null,
rustfmt: {
extraArgs: [],
overrideCommand: null,
enableRangeFormatting: false
},
workspace: { symbol: { search: { scope: 'workspace', kind: 'only_types' } } }
}
INFO [12/26/2021, 10:24:14 AM]: PersistentState: {
lastCheck: undefined,
nightlyReleaseId: undefined,
serverVersion: '0.2.867'
}
INFO [12/26/2021, 10:24:15 AM]: Using server binary at /home/rokonio/.vscode-oss/extensions/matklad.rust-analyzer-0.2.867/server/rust-analyzer
DEBUG [12/26/2021, 10:24:15 AM]: Checking availability of a binary at /home/rokonio/.vscode-oss/extensions/matklad.rust-analyzer-0.2.867/server/rust-analyzer
DEBUG [12/26/2021, 10:24:15 AM]: /home/rokonio/.vscode-oss/extensions/matklad.rust-analyzer-0.2.867/server/rust-analyzer --version: {
error: [Error: spawnSync /home/rokonio/.vscode-oss/extensions/matklad.rust-analyzer-0.2.867/server/rust-analyzer ENOENT
at Object.spawnSync (internal/child_process.js:1067:20)
at spawnSync (child_process.js:611:24)
at Yy (/home/rokonio/.vscode-oss/extensions/matklad.rust-analyzer-0.2.867/out/main.js:61:4063)
at j0 (/home/rokonio/.vscode-oss/extensions/matklad.rust-analyzer-0.2.867/out/main.js:109:3790)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async N0 (/home/rokonio/.vscode-oss/extensions/matklad.rust-analyzer-0.2.867/out/main.js:109:1881)
at async I0 (/home/rokonio/.vscode-oss/extensions/matklad.rust-analyzer-0.2.867/out/main.js:108:3977)
at async lC (/home/rokonio/.vscode-oss/extensions/matklad.rust-analyzer-0.2.867/out/main.js:108:3808)] {
errno: -2,
code: 'ENOENT',
syscall: 'spawnSync /home/rokonio/.vscode-oss/extensions/matklad.rust-analyzer-0.2.867/server/rust-analyzer',
path: '/home/rokonio/.vscode-oss/extensions/matklad.rust-analyzer-0.2.867/server/rust-analyzer',
spawnargs: [ '--version' ]
},
status: null,
signal: null,
output: null,
pid: 25839,
stdout: null,
stderr: null
}
ERROR [12/26/2021, 10:24:15 AM]: Bootstrap error [Error: Failed to execute /home/rokonio/.vscode-oss/extensions/matklad.rust-analyzer-0.2.867/server/rust-analyzer --version
at j0 (/home/rokonio/.vscode-oss/extensions/matklad.rust-analyzer-0.2.867/out/main.js:109:4032)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async N0 (/home/rokonio/.vscode-oss/extensions/matklad.rust-analyzer-0.2.867/out/main.js:109:1881)
at async I0 (/home/rokonio/.vscode-oss/extensions/matklad.rust-analyzer-0.2.867/out/main.js:108:3977)
at async lC (/home/rokonio/.vscode-oss/extensions/matklad.rust-analyzer-0.2.867/out/main.js:108:3808)]