Skip to content

Add precompile statements for Val{PkgArtifacts} artifact dispatch.#4682

Merged
IanButterworth merged 2 commits into
masterfrom
tb/lazyartifacts
May 17, 2026
Merged

Add precompile statements for Val{PkgArtifacts} artifact dispatch.#4682
IanButterworth merged 2 commits into
masterfrom
tb/lazyartifacts

Conversation

@maleadt

@maleadt maleadt commented May 14, 2026

Copy link
Copy Markdown
Member

Avoids load-time codegen in JLL packages using using Pkg.Artifacts.

x-ref JuliaPackaging/JLLWrappers.jl#88

Avoids load-time codegen in JLL packages using `using Pkg.Artifacts`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…nternals

`PkgArtifacts.Artifacts._artifact_str` resolved to `PkgArtifacts._artifact_str`
(since `const Artifacts = PkgArtifacts` shadows the stdlib name and `Pkg` then
re-aliases the same way), which is undefined. Use `parentmodule` on an imported
stdlib function to reach the real `Artifacts` module, and gate each precompile
on `isdefined` so it stays robust if the internals change in future Julia
versions.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@IanButterworth IanButterworth merged commit f52f522 into master May 17, 2026
9 of 11 checks passed
@IanButterworth IanButterworth deleted the tb/lazyartifacts branch May 17, 2026 10:11
@github-project-automation github-project-automation Bot moved this from New to Done in Pkg.jl May 17, 2026
@IanButterworth

Copy link
Copy Markdown
Member

Backport?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants