juliaup icon indicating copy to clipboard operation
juliaup copied to clipboard

Use last provided version specifier instead of first

Open LilithHafner opened this issue 11 months ago • 1 comments

Current behavior

x@ x dev % julia +1.6 +1.9 --version
julia version 1.6.7

Proposed behavior

x@x dev % julia +1.6 +1.9 --version
julia version 1.9.2

Motivation

I have a Julia alias j that expands to julia -q +alpha. I'd like to be able to run j +release and get the release channel, but right now that is not supported.

Precedent

cargo errors

x@x ~ % cargo +1.41.0 +1.67.0 version
error: no such subcommand: `+1.67.0`

gcc prioritizes the second parameter

x@x tmp % ls
source.c
x@x tmp % gcc source.c -o a -o b
x@x tmp % ls
b		source.c

Putting on the official release milestone because this should either be implemented or permanently rejected before the official release.

LilithHafner avatar Aug 09 '23 12:08 LilithHafner

My gut reaction is that this should just be an error, i.e. follow cargo's lead here.

I think one way to still solve your problem might be to change your alias to also set the JULIAUP_CHANNEL env variable to alpha and not use the cmd line arg in the alias, and then when you do j +release it would do what you want because the cmd line arg has higher priority than the env var?

davidanthoff avatar Aug 10 '23 17:08 davidanthoff