`uv self update` should support `--dry-run`
I want uv to tell me whether it thinks it needs an update, before I actually tell it to update.
The most straightforward pattern for this would seem to be supporting --dry-run (which uv lock already supports). uv self update doen't currently support that:
$ uv --version
uv 0.5.7 (3ca155ddd 2024-12-06)
$ uv self update --dry-run
error: unexpected argument '--dry-run' found
tip: to pass '--dry-run' as a value, use '-- --dry-run'
Usage: uv self update [OPTIONS] [TARGET_VERSION]
For more information, try '--help'.
$ uv --dry-run self update
error: unexpected argument '--dry-run' found
Usage: uv [OPTIONS] <COMMAND>
For more information, try '--help'.
$
Possible alternatives:
uv self list-updates(clunky?)uv self update list(ripe for human error)uv self update --list(ditto)uv self list(better, more likeuv python list, may needuv self installtoo? (and maybeuv python updateshould be a command as well?))uv self versions(different name, same action asuv self list, no real precedent though)
Makes sense, I honestly thought this existed.
I started looking into this. Unfortunately fetch_release is not public (https://github.com/axodotdev/axoupdater/blob/1ce5efa7b73e16437bc757c6ca21963ddf18fc45/axoupdater/src/release/mod.rs#L91) and is_update_needed only returns a bool (https://github.com/axodotdev/axoupdater/blob/1ce5efa7b73e16437bc757c6ca21963ddf18fc45/axoupdater/src/lib.rs#L302) so we can't say what version we'll update to. But... better than nothing.