Problem
cargo vendor fails to re-vendor a package if:
- the package vendor dir has a version number (eg because it's not the most recent, or
--versioned-dirs is in use)
- the code has changed
This can happen if the code is coming from a git repo and the rev has been updated, if a patch has been added in the [patch] section of the Cargo.toml, or when switching between crates.io and git as a source.
This doesn't happen for non-versioned directories because cargo vendor unconditionally re-vendors their contents.
Possible Solution(s)
Rather than just comparing the version, it should also check for changes to the patch and/or origin specification.
Notes
Output of cargo version: 1.42, but this hasn't changed in recent versions
Problem
cargo vendorfails to re-vendor a package if:--versioned-dirsis in use)This can happen if the code is coming from a git repo and the
revhas been updated, if a patch has been added in the[patch]section of the Cargo.toml, or when switching between crates.io and git as a source.This doesn't happen for non-versioned directories because
cargo vendorunconditionally re-vendors their contents.Possible Solution(s)
Rather than just comparing the version, it should also check for changes to the patch and/or origin specification.
Notes
Output of
cargo version: 1.42, but this hasn't changed in recent versions