-
Notifications
You must be signed in to change notification settings - Fork 255
Panic when in a Cargo workspace #263
Comments
Seems to be a vscode problem, I can reproduce it with vscode and current master 2c11ee5. It does not reappear when using other editing clients/plugins such as the Language Server for neovim. |
I'm using vscode-rust with freshly installed RLS and I'm getting this problem when I try to format my files, however it does seem that analysis/code completion is working. |
@tomaka - do you have a project that repros this? Does it also happen with our vscode plugin? (https://github.com/jonathandturner/rls_vscode) |
as I understand it, vscode-rust uses the rls_vscode code. My project pandt can repro it (github.com/radix/pandt), I added a rls.toml file at the root directory that enabled unstable features and tried to run Format Document and got this error. |
@radix - in trying some of the radix/pandt subprojects I'm seeing some issues where the rls can't quite handle the projects. If the compiler part of rls fails, then a lot of the features don't work. @tomaka - I saw this with the project @radix also mentioned. Currently, the RLS doesn't work with a "project of projects" style. You have to point it at the subprojects themselves. |
What can we do to get progress on this? |
I'm here from a bug I filed for the vscode-rust extension. In case it helps, I am still getting errors even when isolating to one cargo project (I was indeed trying project-of-projects before). RLS logs:
and the Rust logging output:
|
I seem to be getting OK results if I isolate When run on the subtitles-rs workspace, I get the same errors as everybody else:
Of course, isolating to a single subproject can be frustrating, because then I need to open lots and lots editor windows and Alt-Tab between them. And the project-of-projects design is very tempting in Rust, particularly when the subprojects are reusable, because it drastically reduces compile-times. |
Just pinging this thread - fixing this bug would be a huge quality of life improvement for me. |
There is a workspace mode implemented now, with #462 being the last PR (as of now, still needs more work) to further the workspace support. You can turn it on using With the workspace mode on, the RLS should not panic anymore inside of a workspace and report diagnostics for every package it needs. However, the save-analysis part still requires more work, as rls-analysis now can only host data in a per-crate fashion, whereas a single crate can have multiple save-analysis data (e.g. coming from |
Ah, I had tried enabling Thank you! |
This is basically fixed now. Tracking the final few issues in #132. |
I'm not sure whether I should report this in this repo or in the VSCode plugin repository.
When I'm working on a file of a library that is part of a Cargo workspace, VSCode shows me this output for the RLS:
The text was updated successfully, but these errors were encountered: