Open baoyachi opened 2 years ago
Thanks for the report. I believe this is the default behaviour for all compilation commands in Cargo.
Those errors you saw were actually non-fixable with cargo fix
. Cargo fix does its job by taking rustc's diagnostic suggestions and apply them to your source code. Without succeeding to compile dependencies, cargo cannot proceed to "fix" your crate. You will get the same errors when performing a cargo build
as well.
One way to improve the error message is the author of odbc-api adding rust-version
field in Cargo.toml. The rust-version
field would be checked upfront, so you won't get those detailed error messages from dependencies.
error: package `foo v0.0.1 (/projects/foo)` cannot be built
because it requires rustc 1.9876.0 or newer,
while the currently active rustc version is 1.63.0
I am not sure how Cargo can improve at this moment. Do you have any further suggestion?
Problem
when use
cargo fix
command, does cargo ignore checkdependencies
crate code ,justfix
check current repository codeerror detail
Proposed Solution
just
cargo fix
check current repository code,and fixNotes
No response