Skip to content

Conversation

@KristofferC
Copy link
Member

Screen.Recording.2025-10-27.at.20.50.00.mov

@IanButterworth
Copy link
Member

Neat. How does this work with using different julia versions?

@KristofferC
Copy link
Member Author

How does this work with using different julia versions?

Well, as will all Pkg apps they are more or less locked to a specific julia version (the one you added it with) unless you set the env variable as described in https://pkgdocs.julialang.org/dev/apps/#Overriding-the-Julia-Executable. Then you could set it to e.g. julia and use juliaup to chose the default and all your apps will follow that. But then you have to recompile.

Ideally pkg could just simulate running at the same version as the manifest was resolved with, but for that we need HistoricalStdlibs etc.

@stevengj
Copy link
Member

stevengj commented Nov 9, 2025

An alternative would be to just have julia -pkg <command...>, which would make the julia version easy and explicit?

@KristofferC
Copy link
Member Author

With #4495 we can resolve for other julia versions natively.

@stevengj
Copy link
Member

stevengj commented Nov 9, 2025

Still seems more painful than just doing <myjulia> -pkg <command...>

Pkg seems special enough that it is worth adding a new command-line flag to julia.

@stevengj
Copy link
Member

stevengj commented Nov 9, 2025

Note also that this conflicts with the FreeBSD pkg command, the Solaris pkg command, and perhaps others.

You could call it julia-pkg, of course, but in that case why not julia -pkg?

@KristofferC
Copy link
Member Author

which would make the julia version easy and explicit?

You don't want the julia version explicit, you want to use the one that is in the manifest. So if you want julia -pkg you kind of need juliaup support then (JuliaLang/juliaup#1315). Julia and Pkg are also different projects, I don't think coupling their CLI options together is a good idea.

@stevengj
Copy link
Member

stevengj commented Nov 9, 2025

Julia and Pkg are also different projects, I don't think coupling their CLI options together is a good idea.

They are kind of tightly coupled in practice … it's not like we are talking about some random package here.

@RomeoV

This comment was marked as duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

4 participants