juliaup icon indicating copy to clipboard operation
juliaup copied to clipboard

Update the versions db on more juliaup operations

Open davidanthoff opened this issue 3 years ago • 5 comments

Minimally it should be updated before juliaup update is run.

But probably also before juliaup status is run. For that one we probably need some timeout story, at the moment juliaup status is completely offline and it would be good if it still worked in an offline scenario.

Not sure about other commands? In some way there is almost no harm in adding the update of the versions db to any operation that is already reaching out to the internet, I guess? So before say juliaup add as well?

davidanthoff avatar Nov 28 '22 17:11 davidanthoff

I think before juliaup add is a good idea; if I were to do juliaup add beta, for instance, I would definitely want it to get me the latest beta that exists.

staticfloat avatar Nov 28 '22 19:11 staticfloat

Yeah, I think any operation that already needs Internet access should try to update the versions database. So e.g. juliaup self update (already implemented in https://github.com/JuliaLang/juliaup/pull/493), juliaup update, juliaup add.

DilumAluthge avatar Nov 28 '22 23:11 DilumAluthge

Yep, so I'm done with implementing it for juliaup self update, juliaup update and juliaup add (https://github.com/JuliaLang/juliaup/pull/507).

I think it would be really nice if juliaup status and juliaup list also updated, but with a timeout. Say if the update command doesn't finish in 0.5 seconds, abort it and just show what is already on the local system?

davidanthoff avatar Nov 28 '22 23:11 davidanthoff

Say if the update command doesn't finish in 0.5 seconds, abort it and just show what is already on the local system?

Sounds good to me. Maybe print a brief warning at the top that says Warning: Juliaup was not able to download the versions database?

DilumAluthge avatar Nov 29 '22 06:11 DilumAluthge

We can probably do this after an official release, right? Moving it to the Backlog.

davidanthoff avatar Nov 29 '22 19:11 davidanthoff