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
Member

@IanButterworth IanButterworth commented Jun 18, 2023

@KristofferC
Copy link
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
Member Author

Specifically it's the sourcepath.

@KristofferC
Copy link
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
Member Author

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

@IanButterworth
Copy link
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
Member Author

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

@IanButterworth
Copy link
Member Author

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

@IanButterworth IanButterworth force-pushed the ib/precompile_pidlock branch from 29281d0 to ef17e2b Compare June 20, 2023 19:58
@IanButterworth IanButterworth force-pushed the ib/precompile_pidlock branch from 3b334a1 to ca07f97 Compare June 29, 2023 17:25
@IanButterworth IanButterworth force-pushed the ib/precompile_pidlock branch from ca07f97 to 56e8889 Compare June 29, 2023 17:34
@IanButterworth
Copy link
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
@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