jdx / mise

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

Pipx unaware of uninstalled Python #3152

Closed FelisNivalis closed 4 days ago

FelisNivalis commented 6 days ago

Describe the bug I had python and "pipx:httpie" installed with mise. After uninstalling Python, the executable httpie still links to the removed python interpreter.

To Reproduce

[tools]
python = "latest"
"pipx:*any tool*" = "latest"

Run mise i. Then remove python="latest" and run mise prune.

Expected behavior When uninstalling a python version or doing a mise upgrade, detect and reinstall affected tools; Report such breaks in mise doctor

mise doctor output

version: 2024.11.23 linux-x64 (1980-01-01)
activated: no
shims_on_path: yes

build_info:
  Target: x86_64-unknown-linux-gnu
  Features: DEFAULT, NATIVE_TLS
  Built: Tue, 1 Jan 1980 00:00:00 +0000
  Rust Version: rustc 1.82.0 (f6e511eec 2024-10-15)
  Profile: release

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

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

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

backends:
  aqua
  asdf
  cargo
  core
  go
  npm
  pipx
  spm
  ubi
  vfox

plugins:
  pipx    https://github.com/yozachar/asdf-pipx.git#31db618
  rust    https://github.com/code-lever/asdf-rust.git#95acf4f
  usage   https://github.com/jdx/mise-usage.git#fe3888a

toolset:
  asdf:pipx@1.7.1
  asdf:rust@1.82.0
  asdf:usage@1.3.2
  cargo:ripgrep@14.1.1
  cargo:ripgrep_all@0.10.6
  core:go@1.23.3
  core:node@20.18.1
  core:python@3.13.0
  core:zig@0.13.0
  go:github.com/jesseduffield/lazygit@0.44.1
  npm:gtop@1.1.5
  npm:ijavascript@5.2.1
  npm:itypescript@0.4.0
  npm:neovim@5.3.0
  pipx:httpie@3.2.4

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 = true
  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 = true
  log_level = "info"
  not_found_auto_install = true
  paranoid = false
  pin = false
  plugin_autoupdate_last_check_duration = "7d"
  profile = "test"
  quiet = false
  raw = false
  trace = false
  trusted_config_paths = []
  unix_default_file_shell_args = ["sh"]
  unix_default_inline_shell_args = [
      "sh",
      "-c",
  ]
  use_file_shell_for_executable_tasks = false
  use_versions_host = true
  verbose = false
  windows_default_file_shell_args = [
      "cmd",
      "/c",
  ]
  windows_default_inline_shell_args = [
      "cmd",
      "/c",
  ]
  windows_executable_extensions = [
      "exe",
      "bat",
      "cmd",
      "com",
      "ps1",
      "vbs",
  ]
  yes = false

  [cargo]
  binstall = true

  [node]

  [npm]
  bun = false

  [pipx]
  uvx = false

  [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 = "if_other_versions_installed"
  show_env = false
  show_tools = false
No warnings found
jdx commented 6 days ago

that's just how pipx works

syhol commented 6 days ago

This could be an interesting feature request rather than a bug.

It would be nice to be able to use any language package manager backends (npm/pipx/cargo) without worrying if you have the correct tooling installed to download and run them.

I'm not sure if this would be considered dependency management as mentioned in the anti-goals