UpdateJulia

Updating Julia should be easy. The easier it is, the more likely folks will develop with the latest versions, and the less friction we will have with fast paced language development.

Currently, it is challenging. There are several long, unresolved discourse threads on the topic, 3rd party instructions galore, and more instructions.

The situation is summed up quite well in this concise question and its first answer

We have jill.py, but one of the great attractions of julia is that it is self contained.

Introducing UpdateJulia — a simple cross platform julia installer! :smiley:

]add UpdateJulia
using UpdateJulia
update_julia()
33 Likes

Very nice package! It makes me feel silly for doing all of the downloading and symbolic linking manually this entire time. Does this support installing release candidates as well?

1 Like

Yes!

julia> update_julia("1.7.0-rc3")
installing julia 1.7.0-rc3
This version is out of date. The latest official release is 1.7.0
[...]

Right now, there are no prereleases available for 1.8, but when there are,

julia> update_julia("1.8")
ERROR: ArgumentError: No released versions starting with "1.8"
Stacktrace:
[...]

Should give the latest one. Digging through internals we find these recently released versions:

sort(collect(filter(x -> x >= v"1.6", keys(UpdateJulia.versions[]))))
13-element Vector{VersionNumber}:
 v"1.6.0"
 v"1.6.1"
 v"1.6.2"
 v"1.6.3"
 v"1.6.4"
 v"1.7.0-beta1"
 v"1.7.0-beta2"
 v"1.7.0-beta3"
 v"1.7.0-beta4"
 v"1.7.0-rc1"
 v"1.7.0-rc2"
 v"1.7.0-rc3"
 v"1.7.0"

You can use update_julia("nightly") to get 1.8 today, but the installed version of Julia will likely be buggy and not appropriate for most users. Further, UpdateJulia only supports nightlies on Mac and Windows.

3 Likes

Nice! Out of curiosity, what’s the reason nightlies are not supported on Linux?

Because there is a bug in the code I haven’t gotten around to fixing :slight_smile:
EDIT: they are supported in UpdateJulia v0.2.1

2 Likes

The links for the documentation don’t work.

The README should be a complete guide & documentation. That there are broken links is bad, but I’m not sure how to fix them.
EDIT: this post helped me make the link work, but the readme is probably still a better guide atm.

2 Likes

Is there any relation to juliaup (https://github.com/JuliaLang/juliaup)?

Nope!

I released UpdateJulia in early November 2021 for the user base of folks who already have a (possibly out of date) Julia version installed and want lightweight version instilation and management within the Julia ecosystem. At that time juliaup was a “experimental MSIX installer for Julia for the Windows Store” according to it’s readme.md, and the only other alternative was jill, a linux-only tool.

A few months later, I’m glad to see that juliaup has expanded to more opperating systems! For folks who already have Julia (e.g. most of the people on discourse) I think it is hard to beat the Julia package archetecture (e.g. Users can install and use all of UpdateJulia’s functioanlity without leaving a Julia REPL (REPL restart is still required to switch Julia versions), and UpdateJulia has about 8x fewer SLOC than juliaup).

It’s good to see that folks are addressing the use case of installing Julia for the first time, but I’m worried that this may also call for an automatic juliaup installer :wink: .

I hope Julia will officially ship with one of these installers / updaters. Fragmentation in this area is no big deal but still unfortunate for newcomers.

1 Like

There are many different ways to install juliaup, all very platform dependent. BUT, all of them handle updates to juliaup itself. When juliaup is installed via one of the various system package stories (at the moment that would be Windows Store, brew and AUR) we utilize the update features of those, and if it is installed in standalone mode via the new script based install on Mac and Linux it ships with a very comprehensive update mechanism.

Technically one can do something similar via shell mode with juliaup. I could also see some future version integrate a bit closer into Julia itself, but at the moment the focus is to really get the basic functionality rock solid and working on all platforms.

3 Likes