Skip to content

fix: migrate MISE_CARGO_BINSTALL_ONLY to settings#8202

Merged
jdx merged 5 commits intojdx:mainfrom
risu729:cargo-binstall-settings
Feb 17, 2026
Merged

fix: migrate MISE_CARGO_BINSTALL_ONLY to settings#8202
jdx merged 5 commits intojdx:mainfrom
risu729:cargo-binstall-settings

Conversation

@risu729
Copy link
Contributor

@risu729 risu729 commented Feb 17, 2026

No description provided.

risu729 and others added 2 commits February 17, 2026 19:55
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 17, 2026 09:14
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @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 cargo-binstall behavior within mise. It transitions the MISE_CARGO_BINSTALL_ONLY environment variable into a structured cargo.binstall_only setting, enhancing consistency and providing a more integrated way to manage this preference. The change ensures that the system correctly interprets and applies the setting, improving overall configurability and maintainability.

Highlights

  • Configuration Migration: The MISE_CARGO_BINSTALL_ONLY environment variable has been migrated to a formal mise setting, cargo.binstall_only.
  • New Setting Definition: A new boolean setting, cargo.binstall_only, has been introduced with a default value of false, allowing users to enforce cargo-binstall usage.
  • Backend Logic Update: The CargoBackend logic was updated to read the cargo.binstall_only preference from the mise settings instead of directly checking the environment variable.
  • End-to-End Testing: A new end-to-end test was added to verify the functionality and behavior of the cargo.binstall_only setting across environment variables and CLI commands.
  • Schema and Settings Updates: The mise JSON schema and settings.toml were updated to include the definition and description for the new cargo.binstall_only setting.
Changelog
  • e2e/core/test_cargo_binstall_only
    • Added a new end-to-end test script for the cargo.binstall_only setting.
    • Included mocking for cargo-binstall to simulate its execution.
    • Verified the default state of the setting.
    • Tested setting the value via environment variable and CLI commands.
  • schema/mise.json
    • Added a new binstall_only boolean property to the cargo object within the mise JSON schema.
    • Assigned a default value of false and provided a descriptive explanation for the setting.
  • settings.toml
    • Introduced a new [cargo.binstall_only] section to define the setting.
    • Configured its default value to false and linked it to the MISE_CARGO_BINSTALL_ONLY environment variable.
    • Specified its type as Bool and added a description.
  • src/backend/cargo.rs
    • Removed an unused env import statement.
    • Modified the conditional logic to check Settings::get().cargo.binstall_only instead of env::var("MISE_CARGO_BINSTALL_ONLY").
    • Updated the error message to reference the new cargo.binstall_only setting.
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@risu729 risu729 changed the title feat: migrate MISE_CARGO_BINSTALL_ONLY to settings fix: migrate MISE_CARGO_BINSTALL_ONLY to settings Feb 17, 2026
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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=1 env-var check to Settings::get().cargo.binstall_only.
  • Add cargo.binstall_only metadata to settings.toml and 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");
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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");

Copilot uses AI. Check for mistakes.
@jdx jdx merged commit d9880ce into jdx:main Feb 17, 2026
33 checks passed
@risu729 risu729 deleted the cargo-binstall-settings branch February 17, 2026 10:51
mise-en-dev added a commit that referenced this pull request Feb 18, 2026
### 🚀 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)
lucasew pushed a commit to lucasew/CONTRIB-mise that referenced this pull request Feb 18, 2026
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
risu729 added a commit to risu729/mise that referenced this pull request Feb 27, 2026
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
risu729 pushed a commit to risu729/mise that referenced this pull request Feb 27, 2026
### 🚀 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants