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

Closed
liskin opened this issue Nov 1, 2024 · 5 comments
Closed

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

liskin opened this issue Nov 1, 2024 · 5 comments
Labels

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:timezonefinder@6.5.4
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/cargo-binstall@1.10.9
  cargo:JojiiOfficial/LiveBudsCli@ref:4a2d75f5bede545738110dccbac033954b1d6087
  cargo:ast-grep@0.28.0
  cargo:cargo-audit@0.21.0
  cargo:cargo-cache@0.8.3
  cargo:cargo-edit@0.13.0
  cargo:cargo-watch@8.5.3
  cargo:ripgrep_all@0.10.6
  cargo:tokio-console@0.1.13
  cargo:watchexec-cli@2.2.0
  npm:prettier@3.3.3
  npm:typescript-language-server@4.3.3
  pipx:gdbgui@0.15.2.0
  pipx:git-when-merged@1.2.1
  pipx:liskin/foursquare-swarm-ical@172e1d0336fdab568ab6b5ed505a06daafa5078c
  pipx:liskin/liscopridge@a9c2debe41d045ef184c87bbad331ee6fa20b13c
  pipx:liskin/strava-gear@6883fefc8a8f0a2e5144f271480e406a33540417
  pipx:liskin/strava-offline@1abe986b2d1ba6a300954df6ff648d88bead6c80
  pipx:markdown2ctags@0.3.3
  pipx:pandoc-plantuml-filter@0.1.5
  pipx:pushl@0.3.5
  pipx:python-dxf@12.1.0
  pipx:timezonefinder@6.5.4
  ubi:YodaEmbedding/frece@v1.0.6
  ubi:ankitpokhrel/jira-cli@v1.5.2
  ubi:astral-sh/uv@0.4.20
  ubi:bazelbuild/buildtools@v7.3.1
  ubi:evcxr/evcxr@v0.17.0
  ubi:hadolint/hadolint@v2.12.0
  ubi:kubernetes-sigs/kind@v0.22.0
  ubi:oz/tz@v0.7.0
  ubi:pkolaczk/fclones@v0.34.0
  ubi:rust-analyzer/rust-analyzer@2024-10-28
  ubi:tamasfe/taplo@0.9.3
  ubi:tilt-dev/ctlptl@v0.8.34
  ubi:tilt-dev/tilt@v0.33.20
  ubi:wagoodman/dive@v0.12.0
  usage@1.0.1

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 <216188+jdx@users.noreply.github.com>
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 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

@liskin
Copy link
Contributor Author

liskin commented Nov 17, 2024

With #2885 being done, this is no longer an issue as the following just works:

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

[tools]
uv = "0.5.2"
"pipx:timezonefinder" = "6.5.4"

[alias]
uv = "ubi:astral-sh/uv"

I think we can close this.

@liskin liskin closed this as completed Nov 17, 2024
@liskin
Copy link
Contributor Author

liskin commented Nov 18, 2024

(actually, with mise registry now preferring aqua over asdf for uv, I don't even need that alias! that's awesome ❤)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants