Description
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 line
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.
Steps
- git clone the repo at https://github.com/exo-cortex/simple_axum_button_response
- run cargo build
- correct the misspelled word "verion" in
Cargo.toml
- run cargo build again
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