fix: migrate MISE_CARGO_BINSTALL_ONLY to settings#8202
Conversation
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Summary of ChangesHello @risu729, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request refactors the configuration for Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request migrates the MISE_CARGO_BINSTALL_ONLY environment variable to a new setting, cargo.binstall_only. The changes include adding the new setting to the configuration schema and settings definition, updating the cargo backend to use the new setting, and adding an end-to-end test to verify its functionality. The implementation is solid, but I've noted a minor issue regarding the alphabetical sorting of settings in settings.toml.
There was a problem hiding this comment.
Pull request overview
Migrates the MISE_CARGO_BINSTALL_ONLY environment toggle into the unified settings system as cargo.binstall_only, and updates the cargo backend to respect it.
Changes:
- Switch Cargo backend gating from
MISE_CARGO_BINSTALL_ONLY=1env-var check toSettings::get().cargo.binstall_only. - Add
cargo.binstall_onlymetadata tosettings.tomland expose it in the JSON schema. - Add an e2e test intended to validate the new setting behavior via default/env/CLI.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/backend/cargo.rs |
Uses the new cargo.binstall_only setting to force failure when cargo-binstall can’t be used. |
settings.toml |
Defines new setting cargo.binstall_only (default/env/type/description). |
schema/mise.json |
Adds cargo.binstall_only to the cargo settings schema. |
e2e/core/test_cargo_binstall_only |
New e2e coverage for reading/writing cargo.binstall_only via settings/env/CLI. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| } else if env::var("MISE_CARGO_BINSTALL_ONLY").is_ok_and(|v| v == "1") { | ||
| bail!("cargo-binstall is not available, but MISE_CARGO_BINSTALL_ONLY is set"); | ||
| } else if Settings::get().cargo.binstall_only { | ||
| bail!("cargo-binstall is not available, but cargo.binstall_only is set"); |
There was a problem hiding this comment.
cargo.binstall_only triggers this bail whenever is_binstall_enabled() returns false, but that can happen for reasons other than “cargo-binstall is not available” (e.g., cargo.binstall disabled, or install options like features/default-features forcing fallback). Consider improving the error message to reflect that cargo-binstall could not be used (and ideally include the reason), so users aren’t misled when it’s installed but intentionally/implicitly disabled.
| bail!("cargo-binstall is not available, but cargo.binstall_only is set"); | |
| bail!("cargo-binstall could not be used for this installation, but cargo.binstall_only is set"); |
### 🚀 Features - **(mcp)** add run_task tool for executing mise tasks by @joaommartins in [#8179](#8179) - **(node)** suggest setting node.flavor if the flavor is not found in mirror by @risu729 in [#8206](#8206) ### 🐛 Bug Fixes - **(java)** sort order for shorthand versions by @roele in [#8197](#8197) - **(node)** migrate env vars to settings by @risu729 in [#8200](#8200) - **(registry)** apply overrides in shims by @risu729 in [#8199](#8199) - migrate MISE_CARGO_BINSTALL_ONLY to settings by @risu729 in [#8202](#8202) ### 📚 Documentation - **(doctor)** fix subcommand in an example by @risu729 in [#8198](#8198) ### 📦 Registry - add github backend for typst by @3w36zj6 in [#8210](#8210) ### Chore - **(test)** disable flaky Forgejo e2e test by @jdx in [#8211](#8211)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
### 🚀 Features - **(mcp)** add run_task tool for executing mise tasks by @joaommartins in [jdx#8179](jdx#8179) - **(node)** suggest setting node.flavor if the flavor is not found in mirror by @risu729 in [jdx#8206](jdx#8206) ### 🐛 Bug Fixes - **(java)** sort order for shorthand versions by @roele in [jdx#8197](jdx#8197) - **(node)** migrate env vars to settings by @risu729 in [jdx#8200](jdx#8200) - **(registry)** apply overrides in shims by @risu729 in [jdx#8199](jdx#8199) - migrate MISE_CARGO_BINSTALL_ONLY to settings by @risu729 in [jdx#8202](jdx#8202) ### 📚 Documentation - **(doctor)** fix subcommand in an example by @risu729 in [jdx#8198](jdx#8198) ### 📦 Registry - add github backend for typst by @3w36zj6 in [jdx#8210](jdx#8210) ### Chore - **(test)** disable flaky Forgejo e2e test by @jdx in [jdx#8211](jdx#8211)
No description provided.