Why RustRover do not prompt when i adding dependencies in Cargo.toml

i was trying to add some dependencies in my project, but rustrover prompt nothing just like using a txt editer.and when i use clion to edit Cargo.toml, it works will. what's happen? and how to fix it?

Seems like these are different pieces of software with differing feature sets.

But you can ask :slight_smile:

Raise a feature request with Jetbrains here.

I assume you still get syntax highlighting and prompts for other values in cargo.toml such as:

[workspace.li<caret>] # should offer `lints`

If not, check you're in the latest version of rust rover.

I don't use rust rover myself btw, this is all just found using Google :slight_smile:

yes,but i have try to search many times, but never works,include this time :pleading_face:

Does this page help?

1 Like

no.....

If it helps, cargo add and friends are avaliable by default now, so there's less need to get assistance in there, but it Works On My Machine, so there is something wrong

I assume you expect some completion list either for the library or the available versions but don't see them? I'm currently using RustRover, but I don't observe this problem; the IDE proposes me a completion list for either the name or the version. It's 2024.1.6, though; I haven't updated to 2024.2 yet (please note that latest version forces their new UI unless you download a plugin for the normal one).

Haven't you set Cargo to offline mode? It's in Build, Execution, Deployment / Build Tools / Cargo.

Otherwise, if that's a new project or if the cache was recently cleared, some of the code-awareness is sometimes disabled or misbehaving for a while until the IDE's database is reconstructed (could be slower if the IDE's in power save mode - see in the File menu). I've seen behaviour like that, now and then, and a few minutes later, everything was fine again.

Or you could try and invalidate the cache. In some extreme but recurrent occasions, I have to relocate a project in a new directory (or manually empty all the IDE caches, which is very tedious) to solve weird bugs. I doubt any of that is the cause here, though.

If it's none of the above, use Help / Submit a Bug Report, so that all the logs are attached. They usually answer quickly to issues like that. EDIT: I've also seen Jetbrains asking for diagnostic logs for similar issues, if you want to save time: Help | Collect Logs and Diagnostic Data.

i tried to set cargo to offline mode, it didn't work, acutually, it does not allways doesn't work, at one time, i just updated "Dev Containers" . the prompt in "Cargo.toml" works, but just few times and then it does not work again

No, the suggestion was to disable offline mode, or it can't fetch the current crates. But it looks more complicated than a simple setting, so just submit a bug from the IDE with the procedure above.

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.