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

List available upgrades for tools with uv tool list --outdated #9309

Open
traynier opened this issue Nov 21, 2024 · 5 comments
Open

List available upgrades for tools with uv tool list --outdated #9309

traynier opened this issue Nov 21, 2024 · 5 comments
Labels
enhancement New feature or improvement to existing functionality help wanted Contribution especially encouraged

Comments

@traynier
Copy link

traynier commented Nov 21, 2024

Is there no way of seeing updates for tools?

I currently have ruff 0.7.3 installed. I can successfully upgrade the tool using uv tool upgrade ruff, which updates it to 0.7.4, but would like to see what is available to upgrade first so that I can go and read the release notes (and put it in a script to show me when new versions are available). I used uv tool install ruff rather than just running via uvx so that I can use generate-shell-completion for it (that does not work when running under uvx as starting a command with uvx ruff ... does not show shell completion for ruff ...)

I am using uv 0.5.3 on Windows, with Powershell 7.4.6

> uv tool list
ruff v0.7.3
- ruff.exe

My uv installed version of ruff is old, but I would have expected to be able to use --outdated like on uv pip list / uv tree

> uv tool list --outdated
error: unexpected argument '--outdated' found

Usage: uv.exe tool list [OPTIONS]

I was looking at if there was other ways of doing this, but it appears not. Oddly, the shell completion for powershell gives --no-upgrade as an option on uv tool upgrade :

> uv tool upgrade --no-upgrade--allow-insecure-host
--all                         --index-strategy              --no-offline                  --resolution
--allow-insecure-host         --index-url                   --no-preview                  --show-settings
--allow-python-downloads      --isolated                    --no-progress                 --upgrade
--binary                      --keyring-provider            --no-python-downloads         --upgrade-package
--build                       --link-mode                   --no-reinstall                --verbose
--build-isolation             --native-tls                  --no-sources                  --version
--cache-dir                   --no-binary                   --no-upgrade                  -C
--color                       --no-binary-package           --offline                     -f
--compile-bytecode            --no-build                    --pre                         -h
--config-file                 --no-build-isolation          --prerelease                  -i
--config-setting              --no-build-isolation-package  --preview                     -n
--default-index               --no-build-package            --project                     -p
--directory                   --no-cache                    --python                      -P
--exclude-newer               --no-color                    --python-fetch                -q
--extra-index-url             --no-compile-bytecode         --python-preference           -U
--find-links                  --no-config                   --quiet                       -v
--help                        --no-index                    --reinstall                   -V
--index                       --no-native-tls               --reinstall-package

no-upgrade

But running it just gives an error:

> uv tool upgrade --no-upgrade ruff
thread 'main' panicked at crates\uv-cli\src\options.rs:18:17:
internal error: entered unreachable code: Clap should make this impossible
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

But that appears to be more an issue with the uv generate-shell-completion powershell as that option is not listed in the help/documentation?

@charliermarsh charliermarsh added the enhancement New feature or improvement to existing functionality label Nov 21, 2024
@charliermarsh
Copy link
Member

I think --outdated makes sense to add here.

I need to look at why we're panicking there -- that's strange.

@charliermarsh charliermarsh self-assigned this Nov 21, 2024
@FishAlchemist
Copy link
Contributor

FishAlchemist commented Nov 21, 2024

@charliermarsh
In uv tool upgrade, --upgrade is enabled by default. However, why not remove both --upgrade and --no-upgrade from uv tool upgrade?
After all, it seems odd for an upgrade tool to have a flag that doesn't upgrade or to explicitly mention upgrading.

@charliermarsh
Copy link
Member

It's a little bit of a pain. We have a common ResolverInstallerArgs struct for arguments that are shared across commands, and --upgrade is inherited from that.

@charliermarsh
Copy link
Member

I'll fix it, it just requires some unfortunate duplication.

@charliermarsh
Copy link
Member

Cleaned up in #9318, but leaving this issue open since it's about --outdated.

@charliermarsh charliermarsh removed their assignment Nov 21, 2024
@charliermarsh charliermarsh added the help wanted Contribution especially encouraged label Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement to existing functionality help wanted Contribution especially encouraged
Projects
None yet
Development

No branches or pull requests

3 participants