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

Lazy artifacts are downloaded during pre-compilation by dependents #69

Open
topolarity opened this issue Sep 12, 2024 · 1 comment
Open
Labels
bug Something isn't working

Comments

@topolarity
Copy link
Contributor

We recently tried to make IntelOpenMP_jll lazy (JuliaPackaging/Yggdrasil#9319), but unfortunately we mostly failed:

(@v1.12) pkg> add MKL_jll
...
Precompiling packages finished.
  1 dependency successfully precompiled in 9 seconds. 24 already precompiled.
  1 dependency had output during precompilation:
┌ MKL_jll
│   Downloading artifact: IntelOpenMP
└

MKL_jll and IntelOpenMP_jll are both intended to be "lazy" - they should not download their artifacts unless at least one of them is triggered by a using at runtime.

However, IntelOpenMP is downloaded essentially because MKL_jll appears anywhere in your Manifest.

That's because the using (at precompile time) in MKL_jll implicitly triggers the lazy download, making it effectively eager (despite the fact that there's no runtime using here)

@topolarity topolarity added the bug Something isn't working label Sep 12, 2024
@topolarity
Copy link
Contributor Author

Related(ish): #65

To solve this we might need a way to do the using ... without triggering the __init__ at pre-compilation time.

JLL's don't actually use their dependencies during (their own) pre-compilation, so they really don't need to run them - it's enough to defer the __init__ of their dependencies to when their own __init__ runs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant