-
Notifications
You must be signed in to change notification settings - Fork 380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dependencies in cargo.toml reported as "No version matching" when the version number is increased. #10644
Comments
我也出现了相同的问题,手动修改版本号后提示:No version matching ..* found for crate ***,怀疑是插件问题,旧版本的idea 2021使用的Rust plugin 0.4.164.4409-212没有此问题 |
Hi! Unfortunately, there isn't enough information to investigate the causes of the issue you facing. |
There are no alternative registries, no cargo update failed, command line or via run cargo command from the plugin, no termination from error or me. Occurs with dependencies updated more than 5 days ago. I have uploaded fresh logs after a project has been opened in the cargo.toml file and cargo update has been ran. Upload id: 2023_07_04_53HpnXGWXRJ2tni4BTu99X (files: clion-logs-20230704-1804534029563639292331698.zip and 2 more) I took another log afterwards after doing the same thing and running the problem checker on the whole project. Upload id: 2023_07_04_Nh6gEvoFC9dc2F29GatNTn (file: clion-logs-20230704-18160112899908384499152678.zip) |
Thank you for sending the logs. It helped me in reproducing and investigating. It seems that issue is related to the incorrect updating crates.io index. |
Deleting the registry did fix the issue. Is there a way to prevent such errors in the future or delete the registry every time this happens? |
At the moment, the reasons for such behaviour are unclear, and unfortunately, the methods to avoid it are also unknown. However, you can use the provided workaround if the issue returns. |
感谢,删除registry文件夹后确实有效 |
I also get this problem sometimes. Interestingly, there is only a warning in |
Hi @rkarp! Thank you for letting us know. Could you please provide information about your environment (IDE, Rust plugin, and rust toolchain versions) where this issue occurred? |
Here's my environment:
Right now it can't find "anyhow" v1.0.71 (it will only autocomplete up to 1.0.70). When I look into my
So I wonder what IntelliJ-Rust is missing here. The problem does not seem to happen for all dependencies, and at some point it does seem to load newer versions. As in the issue problem description, cargo update, invalidate IDE caches etc. does not help, though. |
About the workaround: After closing IntelliJ, backing up (renaming) If I switch back to the old Interestingly, |
@rkarp Could you please send me "broken" cache for anyhow crate? It will help investigate the root of such behavior. You can upload files to our https://uploads.jetbrains.com/. |
@Maksim20023: I've tested additionaly removing |
@rkarp Thank you for the files and your investigative work. It will be conducive to the process. |
Hey everybody! For those hit by this bug, when deleting |
@p-kraszewski: As for me, I've never used |
I have observed this while using cargo-edit to update dependencies. I don't know if it always occurs, but it sure seems to occasionally. I also usually run |
Well, this particular is probably an expected behavior... When you change Side-note - isn't Answering myself: yes, cargo add/remove is now a part of cargo. |
I tried deleting the My registry cache folder: registry.tar.gz |
Another observation: The problem seemingly randomly fixed itself again a few days ago (I had been using the broken cache to see when this would happen). That was before the new Rust plugin update, and I hadn't done any toolchain changes / updates or anything else that I can think of that could have done this. |
At least one cause appears to be the new sparse index that cargo uses. Using the command provided in rust-lang/cargo#12523 ( |
Hi! |
Environment
Problem description
When I update dependencies in my cargo.toml by increasing their version number, the IDE will return warnings when i analyze the whole project in the cargo.toml saying that no version matching for the new ones was found. Does not matter if I run cargo update, invalidate IDE caches, reopen project, warning is still there as if the IDE's cargo registry never gets updated from the creation of the project.
Steps to reproduce
The text was updated successfully, but these errors were encountered: