Open woutervh opened 3 weeks ago
How would this work with just installed via package manager, where just can't overwrite the installed binary?
Not? I always use the curl-script.
If this were implemented, just would need to be able to detect if it was installed in such a way where it was not safe to self-update.
The programs linked in the original comment appear to be package managers whose self update
commands leverage their own package management systems. just
not being a package manager, it doesn't have the required framework to implement this, it has no way to know how to self-update.
It's not inconceivable this could work implemented as --self-update
gated behind a disabled-by-default Cargo feature. The Github release builds could opt into the feature, and the self update could check if the binary can be written to and if so, download and update to latest Github release build. Other builds of just
simply wouldn't have the flag or the self update
functionality (unless of course someone specifically enables the feature and doesn't mind their build overwritten with a later Github release build).
But even adding self update
functionality only for Github release builds might be unwise. It would break backwards-compatibility of repackaging the Github release just
binaries as-is into third-party package management systems, which IIRC some people are doing. Not sure whether just
's commitment to backwards compatibility includes stuff like this?
The programs linked in the original comment appear to be package managers whose self update commands leverage their own package management systems.
No, uv is a stand-alone rust-based executable. The fact it is a replacement for pip that is a package manager for python is coincidence.
The implementation is here: https://github.com/astral-sh/uv/pull/2228/files#diff-7fcfb3d9338c46fcb8b07d828537551de2a3e78090ded4ffbf4337d8c4dcdb8a and uses https://github.com/axodotdev/axoupdater
How would this work with just installed via package manager, where just can't overwrite the installed binary?
It would be nice if just could update itself via
just self update
.For example:
see https://github.com/astral-sh/uv/issues/1591