You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tower-http = { verion = "0.4", features = ["fs"] }
Everything still worked fine and compiled without errors.
But once I corrected the mistake my project now does not compile anymore. I don't completely understand what's happening here. While compiling cargo displayed that it compiled tower-html v0.5.2 - so it somehow read the package name, but ignored the malformed version-statement.
I fixed my problem with the newer version (that cargo somehow used), but It is problematic IMHO that cargo does not warn the user of a misspelled dependency version statement; I did not correctly state the version and it still installed some version.
I don't think this is intended.
Cargo had a bug where a missing version was treated as version = "*". After a several year transition period for people to stop relying on the bug, we've fixed it in #13775 which will be released in 1.79
Closing as this appears to be resolved. If there is a reason for us to keep this open, let us know.
btw you should have at least gotten the following (I do follow the reproduction steps)
warning: dependency (tower-http) specified without providing a local path, Git repository, version, or workspace dependency to use. This will be considered an error in future versions
warning: unused manifest key: dependencies.tower-http.verion
Problem
The code is in this github repo: https://github.com/exo-cortex/simple_axum_button_response
In
Cargo.toml
I missspelled "version" in the lineEverything still worked fine and compiled without errors.
But once I corrected the mistake my project now does not compile anymore. I don't completely understand what's happening here. While compiling cargo displayed that it compiled
tower-html v0.5.2
- so it somehow read the package name, but ignored the malformed version-statement.I fixed my problem with the newer version (that cargo somehow used), but It is problematic IMHO that cargo does not warn the user of a misspelled dependency version statement; I did not correctly state the version and it still installed some version.
I don't think this is intended.
Steps
Cargo.toml
this should give you an errror.
Possible Solution(s)
Check toml file integrity when running cargo commands and warn user.
Notes
No response
Version
No response
The text was updated successfully, but these errors were encountered: