Add precompilation instructions for lazy artifacts.#88
Merged
Conversation
Member
|
Is this better done in a None of the types look specific to JLLWrappers |
Member
Author
|
Yes, but then we don't get this into user's hands anytime soon. |
Member
|
That's good motivation, just wanted to verify We should still add it in both places so that newer Julia versions don't end up with the machine code duplicated in all of their JLL cache files needlessly. Julia should be able to recognize the CodeInstance is in a pre-existing pkgimage and avoid re-serializing it, if our precompilation policy is implemented correctly now |
This was referenced May 14, 2026
0acc212 to
df7a02f
Compare
`Val{LA}` where `LA` is a `Module` is only legal on Julia 1.11+; older
Julia rejects it with `TypeError: in Type, in parameter, expected Type,
got a value of type Module`. The stdlib `Artifacts._artifact_str` /
`__artifact_str` internals also only exist starting Julia 1.11. Move the
precompile body behind a `@static if VERSION >= v"1.11" && isdefined(...)`
gate so 1.6-1.10 still get the `get_julia_libpaths` precompile but skip
the unsupported path.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Member
Author
|
CI fixed, and precompilation upstreamed to LazyArtifacts/Pkg. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Avoids the load-time compilation seen with lazy artifacts, such as in LLVMExtra_jll.
Before:
After:
I don't particularly like the explicit nasty precompile statements, but AFAIU a precompilation workload was tried in the past and removed because it triggered actual compilation.