You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reinstalling binaries from a crate while specifying fewer features does not remove already installed binaries corresponding to no longer active features
#15079
If you first install the binaries of a crate using cargo install, then issue another cargo install specifying fewer features in a way that should result in fewer binaries, those binaries which corresponds to no longer active features are not removed. I'm not sure if this is the intended behavior or not (I could not find anything clear about it), but it was at least not the behavior I expected.
Steps
Install a crate with multiple binaries tied to different features and examine result.
Manually remove installed binaries, install again with features disabled, and examine the result to see that only a subset of binaries are installed. This is what I would have expected already at step 2.
The straight forward solution, I assume, would be to list installed binaries at the start of the process, then do the compilation and installation, and finally remove any previously installed binaries that where not replaced by the newly compiled crate.
auno
changed the title
Reinstalling binaries from a crate while specifying fewer features does remove already installed binaries corresponding to no longer active features
Reinstalling binaries from a crate while specifying fewer features does not remove already installed binaries corresponding to no longer active features
Jan 17, 2025
Problem
If you first install the binaries of a crate using
cargo install
, then issue anothercargo install
specifying fewer features in a way that should result in fewer binaries, those binaries which corresponds to no longer active features are not removed. I'm not sure if this is the intended behavior or not (I could not find anything clear about it), but it was at least not the behavior I expected.Steps
Install a crate with multiple binaries tied to different features and examine result.
Reinstall the same crate with features disabled and examine the result to see that the same binaries are still installed.
Manually remove installed binaries, install again with features disabled, and examine the result to see that only a subset of binaries are installed. This is what I would have expected already at step 2.
Possible Solution(s)
The straight forward solution, I assume, would be to list installed binaries at the start of the process, then do the compilation and installation, and finally remove any previously installed binaries that where not replaced by the newly compiled crate.
Version
The text was updated successfully, but these errors were encountered: