juliaup icon indicating copy to clipboard operation
juliaup copied to clipboard

Juliaup installed in `.julia/juliaup` despite asking to installing it in a different directory

Open giordano opened this issue 1 year ago • 8 comments

During the installation I chose to install juliaup in a directory different from .julia/juliaup and yet it is installed in .julia/juliaup which is not what I wanted nor what I asked and makes it impossible having two separate installations on the same filesystem.

giordano avatar Sep 13 '22 20:09 giordano

Also, doing juliaup update from one installation overwrites the other one, making it unusable. This is particularly unusable and unintuitive, since I specifically asked for a different directory.

For those reading along, this is related to https://github.com/JuliaLang/juliaup/issues/397#issuecomment-1244376331

giordano avatar Sep 13 '22 20:09 giordano

There are two locations in play here: the location where Juliaup itself is installed, and the Julia depot where Juliaup installs Julia versions. If you specify your own location during setup that only affects the former, not the latter. The latter is controlled by the JULIA_DEPOT_PATH env variable.

If you install two versions of Juliaup (which is probably not a good idea in general), then each will store things in the same Julia depot, unless you launch with a custom JULIA_DEPOT_PATH.

So, at the moment I'd say this is all by design. We probably should add more documentation to this and also maybe try to make this distinction clear in the installer, though.

davidanthoff avatar Sep 14 '22 22:09 davidanthoff

There are two locations in play here: the location where Juliaup itself is installed, and the Julia depot where Juliaup installs Julia versions. If you specify your own location during setup that only affects the former, not the latter. The latter is controlled by the JULIA_DEPOT_PATH env variable.

Why they are different? I share the same (already custom) depot for two different installations of julia of two different architectures, and this design breaks my setup.

If you install two versions of Juliaup (which is probably not a good idea in general), then each will store things in the same Julia depot, unless you launch with a custom JULIA_DEPOT_PATH.

Why it's not a good idea? Why would I want to duplicate registries, and source packages? Compile cache is different because the path of the julia is different. You're already taking advantage of this in julaup by using different versions of julia with the same depot, if you say sharing the depot is a bad idea the whole juliaup setup is a bad idea. I've been using this setup for years. That's also the typical setup of most users on an M1/M2 MacBook who use native and Rosetta builds of Julia, with or without juliaup.

giordano avatar Sep 14 '22 22:09 giordano

I think I very generally do not understand what you are trying to do :) Can you explain a bit why you would want to install two versions of Juliaup on your system?

Juliaup itself (and I'm specifically referring to the julialauncher and juliaup binaries here) can be installed in many different ways. One is the standalone installer via the shell script, but on Windows for example it is installed by the Windows Store, or one can use brew, or hopefully eventually we can also get it say into the default distribution mechanism for Ubuntu etc.

And Juliaup then installs Julia versions into the currently active Julia depot, in the same way that Julia installs packages and artifacts etc. into the active Julia depot.

davidanthoff avatar Sep 14 '22 23:09 davidanthoff

I think I very generally do not understand what you are trying to do :) Can you explain a bit why you would want to install two versions of Juliaup on your system?

Since I can't have a single installation of juliaup to manage two different architectures, I have to use separate installations of juliaup, which I had already explained in https://github.com/JuliaLang/juliaup/issues/397#issuecomment-1244376331. I think having two separate installations of juliaup is reasonable (but the error message reported in #397 should be improved, it's rather confusing), but it's apparently impossible if one wants to use the same depot, which is the present issue.

giordano avatar Sep 14 '22 23:09 giordano

One possibility would be to always install Juliaup into ${JULIA_DEPOT_PATH}/juliaup-${arch}.

DilumAluthge avatar Sep 15 '22 02:09 DilumAluthge

I'm starting to wonder whether the best option would be to just generally allow installation of all archs always... Sure, in some situations one can then install something that won't run, but maybe that is OK? @giordano I think that would solve your situation, right?

It would still be limited to the same platform, though. I.e. one couldn't install a Julia Windows binary on a Mac system.

davidanthoff avatar Sep 15 '22 03:09 davidanthoff

I'm starting to wonder whether the best option would be to just generally allow installation of all archs always... Sure, in some situations one can then install something that won't run, but maybe that is OK? @giordano I think that would solve your situation, right?

Not really because without some sort of emulation (which I don't have here) you can't run the launcher for both architectures,only one at the time will work, which isn't much useful. Having the two separate installations is fine with me, if that worked at all, i.e. they should truly be separate and not ending up putting anything in clashing directories.

giordano avatar Sep 15 '22 08:09 giordano

Chiming in from the perspective on an HPC center: We want to provide Juliaup + global preferences to allow users to deploy and update their own preferred version of Juliaup. I tried:

blaschke@cori01:~/julia> ./juliaup-init --path=$(pwd)/juliaup --no-add-to-path --yes

info: downloading installer
Welcome to Julia!

This will download and install the official Julia Language distribution
and its version manager Juliaup.

Juliaup will be installed into the Juliaup home directory, located at:

  /global/homes/b/blaschke/.julia/juliaup

The julia, juliaup and other commands will be added to
Juliaup's bin directory, located at:

  /global/homes/b/blaschke/.julia/juliaup/bin

This path will then be added to your PATH environment variable by
modifying the profile files located at:

  /global/homes/b/blaschke/.bashrc
  /global/homes/b/blaschke/.profile
  /global/homes/b/blaschke/.bash_profile
  /global/homes/b/blaschke/.zshrc

Julia will look for a new version of Juliaup itself every 1440 minutes when you start julia.

and as you can see the install prompt still shows up. This is a problem, because the Julia modules here are generated using CI, so I need to find a way to install and download Juliaup to a specific location without an interactive prompt. Any ideas? Should I be cloning + building Juliaup instead?

JBlaschke avatar Oct 28 '22 17:10 JBlaschke