Open
Description
Problem
In case of 2 crates contain the same binary in case of some feature enabled there is a conflict detected even in case of disabled feature.
This behaviour depends on the order of cargo install
commands, i.e. if you are installing crate with the conflicting binary disabled by feature first you are getting no errors.
Steps
- Install
invalid-bin-conflict-a
first and theninvalid-bin-conflict-b
:
cargo install invalid-bin-conflict-a
cargo install invalid-bin-conflict-b
- There is an error:
$ cargo install invalid-bin-conflict-b
Updating crates.io index
error: binary `invalid-bin-conflict-a` already exists in destination as part of `invalid-bin-conflict-a v0.1.0`
Add --force to overwrite
Possible Solution(s)
Exclude binaries disabled by features for binary conflict check.
Notes
If you try to install invalid-bin-conflict-b
first and then invalid-bin-conflict-a
- there would be no error.
Version
$ cargo version --verbose
cargo 1.80.0 (376290515 2024-07-16)
release: 1.80.0
commit-hash: 37629051518c3df9ac2c1744589362a02ecafa99
commit-date: 2024-07-16
host: x86_64-unknown-linux-gnu
libgit2: 1.7.2 (sys:0.18.3 vendored)
libcurl: 8.6.0-DEV (sys:0.4.72+curl-8.6.0 vendored ssl:OpenSSL/1.1.1w)
ssl: OpenSSL 1.1.1w 11 Sep 2023
os: Gentoo Linux 2.15.0 [64-bit]