fix(cargo): skip binstall for cargo install options#9928
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the Cargo backend to more intelligently decide between using cargo-binstall and cargo install based on the provided tool options. It introduces a BinstallStatus enum to manage these states and updates the documentation to reflect how options like features and default-features trigger a fallback to source builds. Feedback from the review suggests including the locked option in installation and lockfile resolution keys to ensure consistent behavior, skipping cargo-binstall when a custom registry is specified due to lack of CLI support, and adding the crate option to the list of settings that require a cargo install fallback to avoid potential argument conflicts.
Greptile SummaryThis PR fixes the cargo backend to fall back to
Confidence Score: 4/5Safe to merge; the core install logic is correct for all documented cases and well-tested. The only concern is a priority-inversion in binstall_status: unsupported options are detected before the cargo-binstall availability check, so a user with binstall_only=true, no cargo-binstall installed, and features set gets a misleading hint. This affects only an unusual combination of settings with no correctness impact. src/backend/cargo.rs — specifically the ordering of checks in binstall_status Important Files Changed
Reviews (4): Last reviewed commit: "fix(cargo): skip binstall for cargo inst..." | Re-trigger Greptile |
1d58eb9 to
fa8dd6c
Compare
fa8dd6c to
aaa19c2
Compare
This comment was marked as outdated.
This comment was marked as outdated.
### 🚀 Features - **(cli)** rename before flag to minimum release age by @risu729 in [#9768](#9768) - **(core)** deprecate default package files by @jdx in [#9970](#9970) - **(edit)** add --global flag for editing the global config file by @fru1tworld in [#9953](#9953) ### 🐛 Bug Fixes - **(aqua)** support cosign public-key bundles by @jdx in [#9972](#9972) - **(backend)** pass install_env to postinstall by @risu729 in [#9930](#9930) - **(backend)** apply install_env to install commands by @risu729 in [#9929](#9929) - **(cargo)** skip binstall for cargo install options by @risu729 in [#9928](#9928) - **(config)** restore MISE_ENV_FILE setting by @risu729 in [#9903](#9903) ### 🚜 Refactor - **(cli)** use tool wording in version env help by @risu729 in [#9906](#9906) - **(conda)** parse tool options locally by @risu729 in [#9960](#9960) - **(core)** parse plugin tool options locally by @risu729 in [#9963](#9963) - **(go)** parse tool options locally by @risu729 in [#9961](#9961) - **(http)** parse tool options locally by @risu729 in [#9870](#9870) ### 📦️ Dependency Updates - lock file maintenance by @renovate[bot] in [#9954](#9954) - lock file maintenance by @renovate[bot] in [#9957](#9957) ### 📦 Registry - use aqua backend for qsv by @risu729 in [#9910](#9910) ### Ci - build/publish snap package for arm64 by @jnsgruk in [#9948](#9948) ### New Contributors - @jnsgruk made their first contribution in [#9948](#9948) ## 📦 Aqua Registry Updates ### New Packages (2) - [`AOMediaCodec/libavif`](https://github.com/AOMediaCodec/libavif) - [`julian7/redact`](https://github.com/julian7/redact) ### Updated Packages (1) - [`apache/jena`](https://github.com/apache/jena)
Summary
Testing