Skip to content
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

precompile: respect and report cache pidlocking #3519

Merged
merged 10 commits into from
Jul 1, 2023

Conversation

IanButterworth
Copy link
Sponsor Member

@IanButterworth IanButterworth commented Jun 18, 2023

@KristofferC
Copy link
Sponsor Member

Is it really the package version that is locked on? It's the filename no (which doesn't include the version) but has a mix of other things like the project, sysimage, etc.

@IanButterworth
Copy link
Sponsor Member Author

Specifically it's the sourcepath.

@KristofferC
Copy link
Sponsor Member

Okay so that means that two julias with e.g. different sysimage that are precompiling will wait on each other even if they would produce a different precompile file in the end and there wouldn't really be a need for a lock, or?

With preferences, I don't think you even know what the end resulting file name will be until the process is done :/

@IanButterworth
Copy link
Sponsor Member Author

Right. I don't think we can be specific to the cachefile because of all that

@IanButterworth
Copy link
Sponsor Member Author

xref JuliaLang/julia#50206

@vchuravy
Copy link
Member

I will also raise my earlier point again. We need to make this robust against user-interuption. Or at least make it obvious to the user how to cleanup after interruptions.

pacman as an example tells me which file it tried to acquire and if I think the other process was interrupted that I should remove it

@IanButterworth
Copy link
Sponsor Member Author

Do you mean in addition to the stale detection stuff that mkpidlock does automatically?

@IanButterworth
Copy link
Sponsor Member Author

Turns out that was disabled by accident. Fixed in JuliaLang/julia#50214

@IanButterworth
Copy link
Sponsor Member Author

This has addressed feedback and has tests, and I want to work on Pkg.precompile stuff after this so I'm going to merge and bump the stdlib, and then add the news to base NEWS

@IanButterworth IanButterworth merged commit 2d5f98a into JuliaLang:master Jul 1, 2023
13 checks passed
@IanButterworth IanButterworth deleted the ib/precompile_pidlock branch July 1, 2023 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants