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

"failed to execute command: uv tool" if uv installed via mise/ubi #2886

Open
liskin opened this issue Nov 1, 2024 · 3 comments
Open

"failed to execute command: uv tool" if uv installed via mise/ubi #2886

liskin opened this issue Nov 1, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@liskin
Copy link
Contributor

liskin commented Nov 1, 2024

Describe the bug
Since v2024.10.3, mise fails to install pipx:… tools if uv is installed using ubi:astral-sh/uv.

To Reproduce

[settings]
experimental = true
paranoid = true
pipx_uvx = true

[tools]
"ubi:astral-sh/uv" = "0.4.20"
"pipx:timezonefinder" = "6.5.4"

then:

  1. uv install ubi:astral-sh/uv
  2. uv install
mise ERROR Failed to install pipx:[email protected]
mise ERROR failed to execute command: uv tool install timezonefinder==6.5.4
mise ERROR No such file or directory (os error 2)
mise ERROR Run with --verbose or MISE_VERBOSE=1 for more information

Expected behavior
This used to work in v2024.10.2 and earlier, so I expected no regression.
And there doesn't seem to be a viable workaround - see the discussion at #2854 (comment)

mise doctor output

version: 2024.10.13 linux-x64 (ee83488 2024-10-28)
activated: no
shims_on_path: yes

build_info:
  Target: x86_64-unknown-linux-gnu
  Features: DEFAULT, NATIVE_TLS, OPENSSL
  Built: Mon, 28 Oct 2024 03:25:17 +0000
  Rust Version: rustc 1.81.0 (eeb90cda1 2024-09-04)
  Profile: release

shell:
  /bin/bash
  GNU bash, version 5.2.32(1)-release (x86_64-pc-linux-gnu)
  Copyright (C) 2022 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.

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

config_files:
  ~/.config/mise/config.toml

backends:
  cargo
  core
  go
  npm
  pipx
  spm
  ubi
  vfox

plugins:
  usage  https://github.com/jdx/mise-usage.git#fe3888a

toolset:
  ubi:cargo-bins/[email protected]
  cargo:JojiiOfficial/LiveBudsCli@ref:4a2d75f5bede545738110dccbac033954b1d6087
  cargo:[email protected]
  cargo:[email protected]
  cargo:[email protected]
  cargo:[email protected]
  cargo:[email protected]
  cargo:[email protected]
  cargo:[email protected]
  cargo:[email protected]
  npm:[email protected]
  npm:[email protected]
  pipx:[email protected]
  pipx:[email protected]
  pipx:liskin/foursquare-swarm-ical@172e1d0336fdab568ab6b5ed505a06daafa5078c
  pipx:liskin/liscopridge@a9c2debe41d045ef184c87bbad331ee6fa20b13c
  pipx:liskin/strava-gear@6883fefc8a8f0a2e5144f271480e406a33540417
  pipx:liskin/strava-offline@1abe986b2d1ba6a300954df6ff648d88bead6c80
  pipx:[email protected]
  pipx:[email protected]
  pipx:[email protected]
  pipx:[email protected]
  pipx:[email protected]
  ubi:YodaEmbedding/[email protected]
  ubi:ankitpokhrel/[email protected]
  ubi:astral-sh/[email protected]
  ubi:bazelbuild/[email protected]
  ubi:evcxr/[email protected]
  ubi:hadolint/[email protected]
  ubi:kubernetes-sigs/[email protected]
  ubi:oz/[email protected]
  ubi:pkolaczk/[email protected]
  ubi:rust-analyzer/rust-analyzer@2024-10-28
  ubi:tamasfe/[email protected]
  ubi:tilt-dev/[email protected]
  ubi:tilt-dev/[email protected]
  ubi:wagoodman/[email protected]
  [email protected]

env_vars:
  (none)

settings:
  activate_aggressive = false
  all_compile = false
  always_keep_download = false
  always_keep_install = false
  asdf_compat = false
  cache_prune_age = "30d"
  ci = false
  color = true
  debug = false
  disable_backends = []
  disable_default_registry = false
  disable_hints = []
  disable_tools = []
  experimental = true
  fetch_remote_versions_cache = "1h"
  fetch_remote_versions_timeout = "10s"
  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 = "30s"
  jobs = 4
  legacy_version_file = true
  legacy_version_file_disable_tools = []
  libgit2 = true
  lockfile = false
  log_level = "info"
  not_found_auto_install = false
  paranoid = true
  pin = true
  pipx_uvx = true
  plugin_autoupdate_last_check_duration = "7d"
  quiet = false
  raw = false
  trace = false
  trusted_config_paths = ["~/.config/mise/config.toml"]
  use_versions_host = true
  verbose = false
  yes = false

  [cargo]
  binstall = true

  [node]

  [pipx]
  uvx = true

  [python]
  default_packages_file = "~/.default-python-packages"
  pyenv_repo = "https://github.com/pyenv/pyenv.git"
  venv_auto_create = false
  venv_stdlib = false

  [ruby]
  default_packages_file = "~/.default-gems"
  ruby_build_repo = "https://github.com/rbenv/ruby-build.git"
  ruby_install = false
  ruby_install_repo = "https://github.com/postmodern/ruby-install.git"

  [status]
  missing_tools = "always"
  show_env = true
  show_tools = false
No warnings found
No problems found

Additional context
bisected, first bad commit is df47d0a:

df47d0a39769df9cde4f81d316fd8be9ab38ae9c is the first bad commit
commit df47d0a39769df9cde4f81d316fd8be9ab38ae9c
Author: jdx <[email protected]>
Date:   Sun Oct 13 16:44:54 2024 -0500

    fix: do not include shims dir in path_env when reinserting (#2745)
    
    Fixes #2682

 src/path_env.rs | 18 +++---------------
 1 file changed, 3 insertions(+), 15 deletions(-)

somewhat related issue (which has a viable workaround): #2834

@liskin liskin added the bug Something isn't working label Nov 1, 2024
@jdx
Copy link
Owner

jdx commented Nov 1, 2024

I don't see the asdf plugin for uv doing anything special, looks like we can just default mise to use ubi for uv

@liskin
Copy link
Contributor Author

liskin commented Nov 1, 2024

I don't see the asdf plugin for uv doing anything special, looks like we can just default mise to use ubi for uv

Not really, there's two binaries in the uv tarball - uv and uvx. I don't need uvx personally, as I only use that functionality through mise and it's available as uv tool anyway. But others might.

@jdx
Copy link
Owner

jdx commented Nov 1, 2024

there's two binaries in the uv tarball - uv and uvx

ah that is a problem. I wonder if we could use ubi:astral-sh/uv[exe=uv,uvx] and either call ubi twice or get ubi to support that syntax for multi-bin tools like this.

cc @autarch if you have any thoughts on this

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

No branches or pull requests

2 participants