Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ ARG JULIA=1.12.6
ARG JULIA_SHA256=bbabf3bef19421a9dbd24a767d807606ab85e444323b5a1c73ffe293fa3d079a
ENV \
PATH=/opt/julia/bin:$PATH \
JULIA_DEPOT_PATH=/pc/julia_depot
JULIA_DEPOT_PATH=/pc/julia_depot:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

so I missed this in the first review but nothing should use /pc for writable space -- it's intended to be only for the hook installs themselves (and everything else there is ephemeral / blown away)

@damonbayer damonbayer Jun 15, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@asottile Okay, I think this actually points to an upstream problem with pre-commit itself, which is that the packages used by julia hooks get installed into the global depot, not a hook-specific environment.

As I understand it, the default JULIA_DEPOT_PATH (~/.julia) does not persist across the hook installation and the run phase in pre-commit.ci. This is why I could not leave JULIA_DEPOT_PATH unset in my initial PR.

As a workaround, I set the JULIA_DEPOT_PATH inside of /pc which does persist. As you say, this is not quite what the /pc directory is for.

I think the right fix is to set JULIA_DEPOT_PATH in get_env_patch to a depot inside the hook env dir that's already used for JULIA_LOAD_PATH, e.g. os.path.join(target_dir, 'depot') + os.pathsep. The trailing separator maintains the speedup I intended to implement in this PR.

Does that sound right to you?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

yeah that sounds right to me

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@asottile I opened pre-commit/pre-commit#3711 and committed 117f36e (this PR) in anticipation.

RUN : \
&& echo 'lang: julia' \
&& julia_minor="${JULIA%.*}" \
Expand Down
Loading