Closed
Description
When VS Code loads and rust-analyzer is loading my workspace, I am shown the following popup:
This happens fairly consistently for me for the https://github.com/hotg-ai/proc-blocks project.
Here are some minimal instructions for checking out a version I'm seeing issues with (the latest master
), although I've seen the same issue when checking out commits from a couple months ago.
$ cd /tmp
$ git clone [email protected]:hotg-ai/proc-blocks.git
$ cd proc-blocks
$ git checkout 441e1e9be # current master
$ cargo build --quiet
Compiling proc-macro2 v1.0.36
...
Compiling fft v0.11.1 (/home/consulting/Documents/hotg-ai/proc-blocks/fft)
Finished dev [unoptimized + debuginfo] target(s) in 14.61s
$ code .
Rust Analyzer Client output
INFO [1/24/2022, 2:05:24 AM]: Extension version: 0.3.914
INFO [1/24/2022, 2:05:24 AM]: Using configuration {
cargoRunner: null,
runnableEnv: null,
inlayHints: {
enable: true,
smallerHints: true,
chainingHints: true,
maxLength: 25,
parameterHints: false,
typeHints: true,
hideNamedConstructorHints: 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: {
exprFillDefault: 'todo',
importGranularity: 'crate',
importEnforceGranularity: true,
importPrefix: 'by_crate',
importGroup: true,
allowMergingIntoGlobImports: true
},
cache: { warmup: true },
callInfo: { full: true },
cargo: {
autoreload: true,
allFeatures: true,
unsetTest: [ 'core' ],
features: [],
runBuildScripts: true,
useRustcWrapperForBuildScripts: true,
noDefaultFeatures: false,
target: null,
noSysroot: false,
loadOutDirsFromCheck: true
},
checkOnSave: {
enable: true,
allFeatures: null,
allTargets: true,
command: 'check',
noDefaultFeatures: null,
target: null,
extraArgs: [ '--target-dir', '/tmp/rust-analyzer-target' ],
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: [ 'macro-error' ],
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: false },
procMacro: { enable: true, server: null, ignored: {} },
runnables: { overrideCargo: null, cargoExtraArgs: [] },
rustcSource: null,
rustfmt: {
extraArgs: [],
overrideCommand: null,
enableRangeFormatting: false
},
workspace: { symbol: { search: { scope: 'workspace', kind: 'only_types' } } },
updates: { channel: 'nightly' }
}
INFO [1/24/2022, 2:05:24 AM]: PersistentState: { serverVersion: '0.3.914' }
INFO [1/24/2022, 2:05:24 AM]: Using server binary at /home/consulting/.vscode/extensions/matklad.rust-analyzer-0.3.914/server/rust-analyzer
DEBUG [1/24/2022, 2:05:24 AM]: Checking availability of a binary at /home/consulting/.vscode/extensions/matklad.rust-analyzer-0.3.914/server/rust-analyzer
DEBUG [1/24/2022, 2:05:24 AM]: /home/consulting/.vscode/extensions/matklad.rust-analyzer-0.3.914/server/rust-analyzer --version: {
status: 0,
signal: null,
output: [ null, 'rust-analyzer baa5cd952 2022-01-23 nightly\n', '' ],
pid: 4080009,
stdout: 'rust-analyzer baa5cd952 2022-01-23 nightly\n',
stderr: ''
}
Rust Analyzer Language Server output
[ERROR flycheck] Flycheck failed to run the following command: "cargo" "check" "--workspace" "--message-format=json" "--manifest-path" "/home/consulting/Documents/hotg-ai/proc-blocks/Cargo.toml" "--all-targets" "--all-features" "--target-dir" "/tmp/rust-analyzer-target"
I enabled the rust-analyzer.trace.extension
setting and restarted VS Code, but the "Rust Analyzer Language Server Trace" output doesn't seem to contain anything.
rust-analyzer version: rust-analyzer version: baa5cd952 2022-01-23 nightly
rustc version:
$ rustc --version --verbose
rustc 1.58.0-nightly (bd41e09da 2021-10-18)
binary: rustc
commit-hash: bd41e09da334697c0f993b36685cb599061d9faa
commit-date: 2021-10-18
host: x86_64-unknown-linux-gnu
release: 1.58.0-nightly
LLVM version: 13.0.0