Skip to content

Disallow Pkg.precompile during precompilation #3459

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

IanButterworth
Copy link
Member

Proposed fix for #3458

Basically make it noop during precompilation, and noisy if it's specifically called, silent if it's autoprecompilation.

But I'm not sure if this would prevent Pkg.precompile being baked into the julia sysimage, and I'm pretty sure it will stop it from being baked into a Pkg pkgimage.

@vchuravy

@IanButterworth IanButterworth requested a review from vchuravy May 5, 2023 15:27
@vchuravy
Copy link
Member

vchuravy commented May 5, 2023

Having precompile statements should still work fine.

@vchuravy vchuravy requested a review from KristofferC May 5, 2023 16:08
@KristofferC
Copy link
Member

KristofferC commented May 5, 2023

We call this while creating the sysimage and also want to call it during precompilation when Pkg is not in sysimage.

@IanButterworth
Copy link
Member Author

IanButterworth commented May 7, 2023

I thought @vchuravy's comment meant that when julia is in the mode to generate precompile statements jl_generating_output == 0? So the sysimage mechanism should still work?

As for pkgimage precompilation, that does seem like it would need to circumvent this, which could be put in place as an internal kwarg that could be set, perhaps?

@vchuravy
Copy link
Member

vchuravy commented May 7, 2023

How do we prevent the fork-bomb from occuring if we were to execute this during the precompilation of Pkg? Probably because we changed to a temporary project?

For PKG, the old method of collecting precompilation statements and then including those and regenerating the cache file might be better?

@github-project-automation github-project-automation bot moved this to New in Pkg.jl Jul 2, 2025
@IanButterworth IanButterworth moved this from New to Icebox in Pkg.jl Jul 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Icebox
Development

Successfully merging this pull request may close these issues.

3 participants