Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cargo backend doesn't use Binstall if it is managed by Mise #1506

Closed
GreyTeardrop opened this issue Jan 23, 2024 · 1 comment · Fixed by #1507
Closed

Cargo backend doesn't use Binstall if it is managed by Mise #1506

GreyTeardrop opened this issue Jan 23, 2024 · 1 comment · Fixed by #1507
Labels
bug Something isn't working

Comments

@GreyTeardrop
Copy link

GreyTeardrop commented Jan 23, 2024

Describe the bug

The Cargo backend can only use binstall if it is installed without Mise help, e.g. via rustup and cargo install. If binstall was installed by Mise via cargo:cargo-binstall or via cargo install cargo-binstall into a Mise-managed Rust, it is not detected by Mise and mise install cargo:* installs crates from source.

To Reproduce

  1. Install Mise
  2. Enable experimental mode.
  3. Install Rust via Rustup.
  4. Install Cargo Binstall via mise use -g cargo:cargo-binstall@latest.
  5. Check that Binstall is available on the PATH: which cargo-binstall.
  6. Check that Binstall is discovered by Cargo: cargo --list|grep binstall.
  7. Install any crate like eza and observe that it is installed from source: mise install cargo:eza@latest.
  8. Uninstall eza mise uninstall cargo:eza@latest.
  9. Install Cargo Binstall by running cargo install cargo-binstall.
  10. Install eza again: mise install cargo:eza@latest, it is now installed by Cargo Binstall.

Expected behavior

Ideally, any cargo-binstall available on the PATH should be used. OR the documentation updated to mention that Binstall shouldn't be installed by Mise.

mise doctor output

mise version:
  2024.1.24 linux-arm64 (de37513 2024-01-20)

build:
  Target: aarch64-unknown-linux-gnu
  Features: DEFAULT, NATIVE_TLS, OPENSSL
  Built: Sat, 20 Jan 2024 02:48:57 +0000
  Rust Version: rustc 1.75.0 (82e1608df 2023-12-21)
  Profile: release

shell:
  bash
  GNU bash, version 5.1.16(1)-release (aarch64-unknown-linux-gnu)
  Copyright (C) 2020 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

  This is free software; you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.

mise data directory:
  /root/.local/share/mise

mise environment variables:
  MISE_SHELL=bash

settings:
  {
    "activate_aggressive": false,
    "all_compile": false,
    "always_keep_download": false,
    "always_keep_install": false,
    "asdf_compat": false,
    "cargo_binstall": true,
    "color": true,
    "disable_default_shorthands": false,
    "disable_tools": [],
    "experimental": true,
    "jobs": 4,
    "legacy_version_file": true,
    "legacy_version_file_disable_tools": [],
    "node_compile": false,
    "not_found_auto_install": true,
    "paranoid": false,
    "plugin_autoupdate_last_check_duration": "7d",
    "python_compile": false,
    "python_default_packages_file": "/root/.default-python-packages",
    "python_patch_url": null,
    "python_precompiled_os": null,
    "python_patches_directory": null,
    "python_precompiled_arch": null,
    "python_pyenv_repo": "https://github.com/pyenv/pyenv.git",
    "python_venv_auto_create": false,
    "raw": false,
    "shorthands_file": null,
    "task_output": null,
    "trusted_config_paths": [],
    "quiet": false,
    "verbose": false,
    "yes": false,
    "ci": false,
    "cd": null,
    "debug": false,
    "env_file": null,
    "trace": false,
    "log_level": "info"
  }

config files:
  ~/.config/mise/config.toml

plugins:
  bun      (core)
  deno     (core)
  erlang   (core)
  go       (core)
  java     (core)
  node     (core)
  python   (core)
  ruby     (core)

toolset:
  cargo:cargo-binstall@latest

Additional context

@GreyTeardrop GreyTeardrop added the bug Something isn't working label Jan 23, 2024
jdx added a commit that referenced this issue Jan 23, 2024
Fixes #1506

I have not tested this myself but it should fix the problem.
jdx added a commit that referenced this issue Jan 23, 2024
Fixes #1506

I have not tested this myself but it should fix the problem.
@jdx jdx closed this as completed in #1507 Jan 23, 2024
jdx added a commit that referenced this issue Jan 23, 2024
* cargo: allow cargo-binstall from mise itself

Fixes #1506

I have not tested this myself but it should fix the problem.

* Commit from GitHub Actions (test)

---------

Co-authored-by: mise[bot] <123107610+mise-en-dev@users.noreply.github.com>
@GreyTeardrop
Copy link
Author

Thank you! I can confirm that that fixes the issue for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant