I expect the first command below to launch 1.10.0-beta, but it doesn’t. Can anyone tell me what I am doing wrong?
> julia +1.10 -v
julia version 1.9.3
> which julia
/usr/local/bin/julia
> ls -l /usr/local/bin/julia
lrwxr-xr-x 1 luke admin 35 Aug 1 14:16 /usr/local/bin/julia@ -> ../Cellar/juliaup/1.11.22/bin/julia
> ls -l /usr/local/Cellar/juliaup/1.11.22/bin/julia
lrwxr-xr-x 1 luke admin 13 Jul 27 09:09 /usr/local/Cellar/juliaup/1.11.22/bin/julia@ -> julialauncher
> julialauncher +1.10 -v
julia version 1.10.0-beta2
> which julialauncher
/usr/local/bin/julialauncher
> ls -l /usr/local/bin/julialauncher
lrwxr-xr-x 1 luke admin 43 Aug 1 14:16 /usr/local/bin/julialauncher@ -> ../Cellar/juliaup/1.11.22/bin/julialauncher
How did you install things? The thing with the double symbolic links does not look like any of the official ways to do it, right? To me this looks as if, at the end of the day, julia doesn’t launch juliainstaller on your system, for whatever reason…
> julia +1.10 -e 'println(joinpath(Sys.BINDIR, Base.julia_exename()))'
/Users/luke/.julia/juliaup/julia-1.9.3+0.x64.apple.darwin14/bin/julia
And as another data point:
> juliaup default 1.10
Configured the default Julia version to be '1.10'.
> julia -v
julia version 1.10.0-beta2
> julia +release -v
julia version 1.10.0-beta2
You don’t have any alias for julia which adds some default flags or similar?
If the +version is not the first argument I don’t think it works, and would probably give the behavior you see here.
Maybe check what the actual julia process is with ps aux | grep julia, for me juliaup will start two processes, one with the julia +version and one with /path/to/julia/version/bin/julia. Would show that you actually go through the julialauncher and fork a new process for the julia version, and you can also see what the full command run was in case of an alias.
Thanks for the help. I had defined alias julia 'julia --color=yes', and removing the alias solved the problem.
It is somewhat unfortunate that juliaup is incompatible with aliases. Is there a technical reason that the version specifier must be the first argument?
Juliaup currently doesn’t understand the semantics of Julia command line arguments, which it would have to if we want to identify where the arguments to Julia end and any arguments to a script that gets launch start. Essentially we would need a way to tell whether a +1.10 argument is meant for a script that gets launched.
It would be very useful if we added that kind of support to Juliaup, for this case and others. But I can’t think of an easy way to do that, other than completely replicating all the command line options that exist for Julia, which seems tedious…
Instead of an alias, you can define that as a function:
julia() { command julia "$@" --color=yes }
This way, when you pass +1.10 or other arguments from the command line, they go in first in the place of $@, and the --color=yes is always the last argument. So juliaup doesn’t get confused by it.
Or, alternatively, you may be able to directly address the reason you need --color=yes in the first place. In my experience, I’ve only ever needed it when I’ve had a mismatched/unset TERM env var. Doing an export TERM="xterm-color" or something like it might be even simpler… and that may even fix colors in other programs, too (or break them entirely, YMMV).
This would be a nice improvement. For example, I will probably want to configure --banner=short in 1.11 (and currently on my dev build). But this flag cannot be passed to older versions of Julia.