Skip to content

Include Julia#332

Merged
asottile merged 1 commit into
pre-commit-ci:mainfrom
damonbayer:dmb_add_julia
May 29, 2026
Merged

Include Julia#332
asottile merged 1 commit into
pre-commit-ci:mainfrom
damonbayer:dmb_add_julia

Conversation

@damonbayer
Copy link
Copy Markdown
Contributor

@damonbayer damonbayer commented May 12, 2026

Closes #307

Thanks for the very clear instructions on adding a new language!

Tagging @asottile for review

@asottile
Copy link
Copy Markdown
Member

hi yes! I appreciate this I've been really busy recently -- do you think it would be possible to exercise julia in the test file? there's a few examples there that should be easy to follow. the rest looks pretty good though!

@damonbayer
Copy link
Copy Markdown
Contributor Author

@asottile I had written tests but neglected to push them 😅

@damonbayer
Copy link
Copy Markdown
Contributor Author

@asottile Have you had a chance to look at the test?

Copy link
Copy Markdown
Member

@asottile asottile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@asottile asottile enabled auto-merge May 29, 2026 19:04
@asottile asottile merged commit ab0e726 into pre-commit-ci:main May 29, 2026
2 checks passed
@damonbayer
Copy link
Copy Markdown
Contributor Author

Hi @asottile, running into some problems running this on pre-commit.ci with this PR: https://results.pre-commit.ci/run/github/844767997/1780091363.7R9Koc3-QHSGllS_an0sJQ

Below is the result of my asking codex to investigate. It seems plausible, but you certainly would understand better than I would.

Codex investigation

It’s timing out during Julia package setup, before Runic ever runs.

I reproduced with the exact image family:

ghcr.io/pre-commit-ci/runner-image:2026-05-29-2c02030 is the minimal image and has no julia binary.
ghcr.io/pre-commit-ci/runner-image:2026-05-29-2c02030-full does have Julia 1.12.6.
With the -full image, a cold install of fredrikekre/runic-pre-commit@v2.2.0 took 111.5s here, and then the actual hook run took 1.2s.
pre-commit.ci’s build attempt timeout is 120s, so Runic’s first Julia Pkg.instantiate() / precompile path is right on the edge. On CI, with lazy image setup, network variance, or lower CPU, it crosses the 120s limit and gets killed at exactly the log line you showed:

[INFO] Installing environment for https://github.com/fredrikekre/runic-pre-commit.
[INFO] This may take a few minutes...
Interrupted (^C): KeyboardInterrupt

There’s a second wrinkle: runic-pre-commit@v2.2.0 declares language: julia and its entry is src/runic.jl; the script just does using Runic and calls Runic.main(...) (hook manifest, entrypoint). Its Project.toml only declares Runic as a dependency, with no checked-in Manifest.toml, so the first install has to resolve/download/precompile Julia packages.

So the failure is not that Runic is incompatible with the runner. It works once installed. The problem is that the cold Julia environment install is too slow for pre-commit.ci’s per-attempt build timeout. <aking it reliable on pre-commit.ci likely needs prewarming Julia/Runic package state in the image or otherwise reducing the cold Pkg.instantiate() cost.

@asottile
Copy link
Copy Markdown
Member

yeah I mean if it's too slow to install then it's not really going to work

@damonbayer
Copy link
Copy Markdown
Contributor Author

@asottile is it possible to go beyond the 120 sec limit for un-cached hooks? Julia is notoriously slow for "time to first plot" but is extremely quick after things have had a chance to pre-compile.

@ilia-kats
Copy link
Copy Markdown

For me it's still saying Executable julia not found.

@asottile
Copy link
Copy Markdown
Member

asottile commented Jun 1, 2026

@damonbayer there's an install timeout and a separate run timeout -- the one hit in your example above is the former

@ilia-kats that hook is language: system (the old name for language: unsupported ) and not language: julia

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.

include Julia

3 participants