uv icon indicating copy to clipboard operation
uv copied to clipboard

Add a `uv self update` command

Open charliermarsh opened this issue 1 year ago • 5 comments

Summary

Powered by Axo: https://github.com/axodotdev/axoupdater.

Closes https://github.com/astral-sh/uv/issues/1591.

Test Plan

To test locally:

  • rm -f ~/.config/uv/uv-receipt.json /Users/crmarsh/.cargo/bin/uv
  • curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/uv/releases/download/0.1.14/uv-installer.sh | sh
  • cargo run self update

Up-to-date:

Screenshot 2024-03-06 at 12 13 36 AM

Updated:

Screenshot 2024-03-06 at 12 13 54 AM

No receipt:

Screenshot 2024-03-06 at 12 14 13 AM

charliermarsh avatar Mar 06 '24 05:03 charliermarsh

Found an upstream bug: https://github.com/axodotdev/axoupdater/issues/34

konstin avatar Mar 06 '24 09:03 konstin

We may want to consider waiting for https://github.com/axodotdev/axoupdater/issues/34, and we definitely need to wait for axoupdater to give us the updated version back (since the current messages are incorrect).

charliermarsh avatar Mar 06 '24 13:03 charliermarsh

Thinking about https://github.com/axodotdev/axoupdater/issues/34 again, should we feature gate the installer, so that pip/conda/distros can turn it off entirely? Seem safer than relying on recipe.

konstin avatar Mar 07 '24 10:03 konstin

I've shipped a new version of axoupdater with a fix for axodotdev/axoupdater#34, but providing a way to turn off the self update feature entirely for certain distributions isn't a bad idea either.

mistydemeo avatar Mar 08 '24 03:03 mistydemeo

One challenge we'd have there is that we build the standalone binaries as a side-effect of the PyPI wheels. So we'd need to do separate builds (which is doable).

charliermarsh avatar Mar 08 '24 03:03 charliermarsh