Commit f52f522
Add precompile statements for
* Add precompile statements for `Val{PkgArtifacts}` artifact dispatch.
Avoids load-time codegen in JLL packages using `using Pkg.Artifacts`.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* precompile: resolve stdlib `Artifacts` via `parentmodule` and guard internals
`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>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>Val{PkgArtifacts} artifact dispatch. (#4682)1 parent 43dcd1f commit f52f522
1 file changed
Lines changed: 22 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
209 | 231 | | |
210 | 232 | | |
211 | 233 | | |
| |||
0 commit comments