pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/pre-commit/pre-commit/pull/3498

lobal-0bd78641c0a1f3e0.css" /> Julia: support `language_version` by ericphanson · Pull Request #3498 · pre-commit/pre-commit · GitHub
Skip to content

Julia: support language_version#3498

Open
ericphanson wants to merge 3 commits intopre-commit:mainfrom
ericphanson:eph/jl-version
Open

Julia: support language_version#3498
ericphanson wants to merge 3 commits intopre-commit:mainfrom
ericphanson:eph/jl-version

Conversation

@ericphanson
Copy link
Copy Markdown
Contributor

Adds basic support for customizing the Julia version by setting the JULIAUP_CHANNEL environmental variable. This support is limited in a couple ways:

  • We don't check that the user is using juliaup. They could have installed julia some other way in which case the JULIAUP_CHANNEL does not do anything and setting the language_version will not have any effect. That however is the status quo (currently setting the language_version does not have any effect) and many users use juliaup, so I think we could just document that language_version support requires your julia to be from juliaup.
  • If the user passes a channel which is not installed, they will get a juliaup error that the channel can not be found. If we were confident they were using juliaup we could install it on their behalf instead, but I'm not sure this is necessary.

split out from #3494

@asottile
Copy link
Copy Markdown
Member

asottile commented Aug 9, 2025

so while this seems to work it sort of doesn't fit nicely with pre-commit. normally language_version support means that pre-commit will install the particular programming language version into the pre-commit environment such that there's no "external" dependencies on the host itself (in the docs this is referred to as first class language support). I believe this patch doesn't do that -- it instead relies on an external version manager to keep that in sync and so it doesn't fit the same properties as pre-commit does today.

basically for actual language_version support one should be able to pick up the pre-commit cache and drop it on a relatively-similar empty operating system and still have it work (for first class language support)

if I understand correctly language: rust does a similar approach (rustup vs juliaup) and maybe the approach there can be copied here?

@ericphanson
Copy link
Copy Markdown
Contributor Author

I did see (and was surprised) that rust installs an entire tool chain. It seems entirely unnecessary to me, as one Julia installation can be used conflict-free by many users (it is different than python where it avoids a lot of issues to make many installs). I think that would be possible here too, but I’m not very interested in it personally, it seems like a lot of disk space for no gain.

Can something like this be acceptable as non-first class support?

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy