-
Notifications
You must be signed in to change notification settings - Fork 255
Dependency graph not updated after non-top-level Cargo.toml change #546
Comments
This is implemented in Currently in single package mode the RLS runs Cargo, saves rustc invocation for final compilation and only ever reruns that, regardless of the type of the changes. The |
It didn't seem to have any effect whatsoever. But I'll try digging into it a bit more, I'm not 100% sure I persuaded neo-vim to send the configuration correctly (vim configuration doesn't seem to support true/false and has only 1/0, so the JSON contains that too :-|). Anyway, to make sure we both talk about the same thing. I'm not adding a crate in a workspace, I'm adding a 3rd party dependency (like the Also, you list Should I provide the whole communication with RLS and logs? |
Another update. I managed to send the real |
Which LSP client are you using? So the configuration currently has to be sent via I'm not sure if any nvim LSP client supports the configuration part of the protocol at this point. I know that |
I use
Even after adding the |
Can you try passing every setting, like this:
It's all defaults except the |
Still no luck :-(. I managed to get RLS to some very broken state when it reported nothing at all (trying to tweak the config further), but the adding of a crate doesn't seem to work. |
I tried to reproduce doing the following:
I know the bug can be irritating, but to first rule out possible client differences I'd try using VSCode and if it can't be reproduced with it, look towards possibly improving the support for configuration or watch LSP messages in nvim LSP client, as the dep graph update feature needs both of these to work. However if nvim LSP client does send messages in compliance with the protocol, it might still uncover some protocol compliance issues with the RLS itself, so that's surely something worth looking at, however the core feature looks like it's working in the server. |
I can confirm it works as you describe in VSCode. But even when I forced vim to consider Cargo.toml to be rust (and therefore use the same language server for it as the other rust files and send notifications about changes in that file to it), I didn't make it work in nvim. I don't know what the difference is (I didn't manage to capture rls' stdio in VSCode, log to file configuration gives me only the backtraces), but on a first glance the messages sent to it look somewhat sane. I didn't read the protocol spec, though. I'm attaching the captured stdio from nvim, if you can spot a problem. |
This seems like a client problem. If there are things we can address on the server side, then feel free to comment |
Can you point at a concrete problem with what the client sends? If it's a client problem, then it should be fixed in the client, but it would be great to know what the client does wrong in the first place. Looking at the rls.input.txt line 81, it does send the change in Cargo.toml. |
The client should send a |
Reports that this is broken again in VSCode |
Confirmed that this is working in VSCode |
At least on the latest nightly, RLS doesn't update when a Cargo.toml is updated that isn't the top level one in a workspace. |
Hello
I'm observing this situation:
main.rs
.extern crate whatever;
.Cargo.toml
, add it there and switch back.I suspect one of this happens:
Cargo.toml
isn't a rust file, so neo-vim doesn't bother telling RLS about opening it (in fact I use a different language server to check syntax of toml files). Or sometimes I even open the file in a different editor. Should RLS watch file changes on all the relevant files in the project (though some inotify) and fallback to that notification if it doesn't get one from the editor? Eg. synthesizing adidChange
event if the file is edited externally/loaded from git/whatever?The text was updated successfully, but these errors were encountered: