Use Kani's Cargo when calling cargo metadata#3972
Use Kani's Cargo when calling cargo metadata#3972clubby789 wants to merge 1 commit intomodel-checking:mainfrom
cargo metadata#3972Conversation
|
Since kani relies on pinned toolchain for analyzing Rust code through rustc, is it a good practice to run |
|
This was motivated by running Kani in an existing repo with an old |
|
I think
|
|
Unless I'm mistaken, Kani always uses its linked nightly-xxxx toolchain (unless built in a dev environment) for everything else - this fixes the inconsistency here by also using it for |
|
Thanks for the PR! This I'm curious about this comment:
Can you post a follow up in #3967 elaborating more on what happened here? You should be able to invoke Kani in a repo that has a different I'm going to close this PR, but please do follow up in #3967 if you have the bandwidth--if something took hours of debugging, we would like to improve on that. |
When Kani is installed normally, use the Cargo binary from the linked Rust toolchain when calling
cargo metadata.If a
rust-toolchain.tomlis present, or the toolchain has been manually overridden withcargo +1.xx kanian older version ofcargo metadatacan be used, which causes incompatible package IDs to be passed.Resolves #3967
Tested by installing and verifying that
cargo +1.76 kanino longer produces an error.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.