jdx / mise

dev tools, env vars, task runner
https://mise.jdx.dev
MIT License
9.32k stars 259 forks source link

mise fails to install rust library using cargo-binstall #2315

Closed lunks closed 3 weeks ago

lunks commented 3 months ago

Describe the bug When I try to install any cargo plugin via cargo-binstall, it fails. Using cargo-binstall directly works fine.

To Reproduce This is my config.toml:

[settings]
experimental = true
cargo_binstall = true
[tools]
1password-cli = "latest"
awscli = "latest"
aws-copilot = "latest"
aws-sso-cli = "latest"
aws-vault = "latest"
bat = "latest"
bottom = "latest"
"cargo:cargo-binstall" = "latest"
"cargo:cargo-update" = "latest"
"cargo:eza" = "latest"
"cargo:fd-find" = "latest"
"cargo:ripgrep" = "latest"
delta = "latest"
github-cli = "latest"
node = "latest"
"npm:cdk" = "latest"
"pipx:powerline-status" = "latest"
python = "latest"
rust = "latest"
usage = "latest"

Run mise -i cargo:csvlens@latest

Expected behavior

It should install csvlens

mise doctor output

version: 2024.6.6 linux-x64 (409d6e4 2024-06-20)
activated: yes
shims_on_path: no

build_info: 
  Target: x86_64-unknown-linux-gnu
  Features: DEFAULT, NATIVE_TLS, OPENSSL
  Built: Thu, 20 Jun 2024 16:13:11 +0000
  Rust Version: rustc 1.79.0 (129f3b996 2024-06-10)
  Profile: release

shell: 
  /usr/bin/zsh
  zsh 5.9 (x86_64-pc-linux-gnu)

dirs: 
  data: ~/.local/share/mise
  config: ~/.config/mise
  cache: ~/.cache/mise
  state: ~/.local/state/mise
  shims: ~/.local/share/mise/shims

config_files: 
  ~/.tool-versions
  ~/.config/mise/config.toml
  ~/code/allegro/.tool-versions

backends: 
  cargo
  core
  go
  npm
  pipx
  spm
  ubi

plugins: 
  1password-cli  https://github.com/NeoHsu/asdf-1password-cli.git#f5d5aab
  amass          https://github.com/dhoeric/asdf-amass.git#17cec1f
  aws-copilot    https://github.com/NeoHsu/asdf-copilot#1341900
  aws-sso-cli    https://github.com/adamcrews/asdf-aws-sso-cli.git#169a1a3
  aws-vault      https://github.com/karancode/asdf-aws-vault.git#678cacf
  awscli         https://github.com/MetricMike/asdf-awscli.git#ac99537
  bat            https://gitlab.com/wt0f/asdf-bat.git#64022b1
  bat-extras     https://github.com/vhdirk/asdf-bat-extras.git#e38415a
  bottom         https://github.com/carbonteq/asdf-btm.git#fd8a55a
  bun            (core)
  delta          https://github.com/andweeb/asdf-delta.git#501318b
  deno           (core)
  elixir         https://github.com/mise-plugins/mise-elixir.git#7b06439
  erlang         (core)
  github-cli     https://github.com/bartlomiejdanek/asdf-github-cli.git#e0605b7
  go             (core)
  java           (core)
  node           (core)
  python         (core)
  ruby           (core)
  rust           https://github.com/code-lever/asdf-rust.git#95acf4f
  shellcheck     https://github.com/luizm/asdf-shellcheck.git#780d78d
  shfmt          https://github.com/luizm/asdf-shfmt.git#a42c5ff
  usage          https://github.com/jdx/mise-usage.git#fe3888a
  yarn           https://github.com/mise-plugins/asdf-yarn.git#74ea3b9
  zig            (core)

toolset: 
  erlang@26.2.1         
  elixir@1.16.1-otp-26  
  node@18.19.0          
  1password-cli@2.29.0  
  awscli@2.16.12        
  aws-copilot@1.33.4    
  aws-sso-cli@1.16.1    
  aws-vault@7.2.0       
  bat@0.24.0            
  bottom@0.9.6          
  cargo:cargo-binstall@1.6.8  
  cargo:cargo-update@13.4.0  
  cargo:eza@0.18.16     
  cargo:fd-find@10.1.0  
  cargo:ripgrep@14.1.0  
  delta@0.17.0          
  github-cli@2.51.0     
  npm:cdk@2.143.1       
  pipx:powerline-status@2.7  
  python@3.12.4         
  rust@1.79.0           
  usage@0.3.0           
  ruby@3.3.1            
  go@1.22.3             
  yarn@4.3.0            

env_vars: 
  MISE_SHELL=zsh

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
  go_default_packages_file = "~/.default-go-packages"
  go_download_mirror = "https://dl.google.com/go"
  go_repo = "https://github.com/golang/go"
  go_set_gopath = false
  go_set_goroot = true
  go_skip_checksum = false
  http_timeout = 30
  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_default_packages_file = "/home/lunks/.default-python-packages"
  python_pyenv_repo = "https://github.com/pyenv/pyenv.git"
  raw = false
  trusted_config_paths = []
  quiet = false
  verbose = false
  yes = false
  ci = false
  debug = false
  trace = false
  log_level = "info"
  python_venv_auto_create = false

  [status]
  missing_tools = "if_other_versions_installed"
  show_env = false
  show_tools = false

No warnings found
2 problems found:

1. shims are missing, run mise reshim to create them
   Missing shims: csvlens

2. unused shims are present, run mise reshim to remove them
   Unused shims: bat-modules, batdiff, batgrep, batman, batpipe, batwatch, prettier, prettybat

Additional context

$ mise i cargo:csvlens@latest --verbose --debug                                                                                                     (-main) (1.16.1-otp-26/26.2.1)
[DEBUG] ARGS: /home/lunks/.local/bin/mise i cargo:csvlens@latest --verbose --debug
[DEBUG] Config {
    Config Files: [
        "~/code/allegro/.tool-versions",
        "~/.config/mise/config.toml",
        "~/.tool-versions",
    ],
}
[DEBUG] ToolRequestSet.build(119.976µs): ToolRequestSet: ruby@3.3.1 node@18.19.0 rust@latest go@1.22.3 elixir@1.16.1-otp-26 yarn@latest erlang@26.2.1 1password-cli@latest awscli@latest aws-copilot@latest aws-sso-cli@latest aws-vault@latest bat@latest bottom@latest cargo:cargo-binstall@latest cargo:cargo-update@latest cargo:eza@latest cargo:fd-find@latest cargo:ripgrep@latest delta@latest github-cli@latest npm:cdk@latest pipx:powerline-status@latest python@latest usage@latest

[DEBUG] install_versions: cargo:csvlens@latest
[DEBUG] $ cargo-binstall -y csvlens@0.9.1 --root /home/lunks/.local/share/mise/installs/cargo-csvlens/0.9.1
Error:
   0: failed to execute command: cargo-binstall -y csvlens@0.9.1 --root /home/lunks/.local/share/mise/installs/cargo-csvlens/0.9.1
   1: No such file or directory (os error 2)

Location:
   src/cmd.rs:242

Version:
   2024.6.6 linux-x64 (409d6e4 2024-06-20)

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
cocoonkid commented 3 months ago

image

This works for me with ansible.

lunks commented 3 months ago

image

This works for me with ansible.

Yes, using cargo binstall on rust works, but I cannot use mise to do it, ie:

mise i cargo:eza@latest

cocoonkid commented 3 months ago

gotcha. okay it does not work for me either. But the cargo backend is experimental so why not go with default cargo anyhow?

lunks commented 3 months ago

gotcha. okay it does not work for me either. But the cargo backend is experimental so why not go with default cargo anyhow?

That's what I did, but given it's not working I'm reporting the issue.