I've been trying to figure this out for the last 2 days with no luck.
I've been testing out rust-analyzer for a month or two, to replace RLS in both vim (via ALE) and VSCode. It's been working until some time this week (I think roughly when I updated to rust 1.45.0).
Suddenly it doesn't seem to do anything at all, in either editor. I can see it in the list of running processes, both with vim or VSCode, but neither of them reports any errors or problems.
I've tried:
uninstall rust-analyzer (installed via homebrew), clear cache, reinstall
I noted that the homebrew installed version, which claims to be 2020-07-13, reports its version as rust-analyzer ???????
install the latest release from GitHub c9c518e (and specify that as the executable path, ensure the correct binary is running in my list of processes)
reboot
update MacOS
numerous bouts of closing and restarting VSCode and vim.
update vim and ALE
check for updates to VSCode
try a different rust project
try a different machine
try a different non-rust project (both editors still working with gopls)
search the forum and r/rust (it's not this since vim is affected)
rust-analyzer was working for me in both these editors earlier this week. What in the world is going on? I assume this is just a "me" problem, since I'm not seeing other reports or issues in the relevant repos.
Did perhaps my update to 1.45.0 break something?
$ rustup show
Default host: x86_64-apple-darwin
rustup home: /Users/n8henrie/.rustup
installed targets for active toolchain
--------------------------------------
arm-unknown-linux-musleabihf
armv7-unknown-linux-gnueabihf
armv7-unknown-linux-musleabihf
thumbv7m-none-eabi
x86_64-apple-darwin
active toolchain
----------------
stable-x86_64-apple-darwin (default)
rustc 1.45.0 (5c1f21c3b 2020-07-13)
That's what I meant here -- have tried no set path, /usr/local/bin/rust-analyzer (homebrew), and a path to the one downloaded directly from github releases. Same behavior with all. I can verify that it is being launched in all causes ps aux | grep analyzer.
Extension 'matklad.rust-analyzer cannot use PROPOSED API (must started out of dev or enabled via --enable-proposed-api) updateEnableProposedApi @ abstractExtensionService.ts:500
EDIT: And once I start rust-analyzer:
[Extension Host] stack trace: Error: unknown request at handleResponse (/Users/n8henrie/.vscode/extensions/matklad.rust-analyzer-0.2.20200211-dev/out/main.js:3467:48) at processMessageQueue (/Users/n8henrie/.vscode/extensions/matklad.rust-analyzer-0.2.20200211-dev/out/main.js:3294:17) at Immediate. (/Users/n8henrie/.vscode/extensions/matklad.rust-analyzer-0.2.20200211-dev/out/main.js:3278:13) at processImmediate (internal/timers.js:439:21)
t.log @ console.ts:137
$logExtensionHostMessage @ mainThreadConsole.ts:39
_doInvokeHandler @ rpcProtocol.ts:402
_invokeHandler @ rpcProtocol.ts:387
_receiveRequest @ rpcProtocol.ts:303
_receiveOneMessage @ rpcProtocol.ts:230
(anonymous) @ rpcProtocol.ts:105
fire @ event.ts:587
fire @ ipc.net.ts:453
_receiveMessage @ ipc.net.ts:733
(anonymous) @ ipc.net.ts:592
fire @ event.ts:587
acceptChunk @ ipc.net.ts:239
(anonymous) @ ipc.net.ts:200
t @ ipc.net.ts:28
emit @ events.js:203
addChunk @ _stream_readable.js:295
readableAddChunk @ _stream_readable.js:276
Readable.push @ _stream_readable.js:210
onStreamRead @ internal/stream_base_commons.js:166
Huh -- an uninstall and reinstall of the VSCode extension fixed it there. I also now have a bunch of options that weren't there before in settings; I was installing all updates it prompted me for, not sure what happened. I specified the same homebrew-installed binary (instead of the built-in one) and working fine.
Still not working in vim / ALE, but this seems to make it much more likely to be a vim / ALE problem that just happened to pop up at the same time.
Huh. I'm usually a vim guy, decided to try VS Code because it is supposed to work better with rust-analyzer. It seems like it updates all the time, and I haven't disabled the extension auto-updating, so I'm not sure how the extension got out of date. But that does seem like a problem.