-
Notifications
You must be signed in to change notification settings - Fork 101
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
Optimize artifact loading during Pkg.build stage, remove Pkg application dependency from JLL libraries #538
Comments
This is probably a good idea; the code is complex but pretty battle-tested, and gives us a lot of neat things like the ability to figure out which
I'm not sure why we need to do this? Can you explain the benefits?
We actually discussed this in the past, and decided to not do this so that JLL packages have an "escape hatch" in the case of truly exceptional situations where we need to run arbitrary Julia code at JLL package load time. By autogenerating JLL packages, we have a very flexible interface (e.g. all of Julia)
I'm assuming this bullet point is here because you want to include artifacts in the graph? (Or at least,
This would do more than the compiler barrier we recently introduced?
What would this enable? |
The list represents some alternative possibility, so some of the items may conflict and/or be irrelevant after others are implement.
Yes, it would also eliminate the
Yeah, but that also means you can't provide as good static tooling and all that (autogenerated) code duplication makes it harder to push bug fixes across the ecosystem. And the lack of (Future compatibility note: expect that eventually packages will lose the ability to modify certain constants though, such as the project and artifact environments—this is already known as a bit of a reliability and performance issue, but just hasn't been worked on yet, but c.f. JuliaLang/julia#27414 (comment) for example) |
But Pkg is already in the sysimage so does it matter if the whole Platform definition code is moved from one module to another? Naively, it just feels like moving things from one file to another. Is the fact that the "parent module" is Pkg relevant? Or are you saying that it would be good to avoid having a
Sure, but how is this at all relevant to the discussion here? Jll packages don't modify the project or manifest environments, right? |
With the advent of JLL Wrappers and the new Artifacts system in 1.6, I consider this well and truly addressed. :) |
Some history: way back when, the Julia ecosystem used to handle artifacts a little bit like
jll
files currently handles artifacts (through the BinDeps ecosystem)—figuring them out on the fly when loading the package and such. This was a performance and debugging (configuration) mess. Finally,Pkg.build
was created to make sense of it all. Before that, loading packages was awkward (because they could run into various issues with loading files not working and not having good debugging tooling available at load time; and it violates the concept of.ji
files being immutable caches dependent only on their.ji
files), and perhaps equally importantly it was slow. Not very slow—but just enough to be a problem when it started getting used everywhere. We've improved many things since then (such as adding.ji
incremental precompile files, bakingPkg
into the system image, and making a larger precompiled sysimg images) to sometimes bury some of that overhead. AndArtifacts+BinaryBuilder
are also much better now, since they are are mostly always handled duringPkg.build
and are more declarative and also more carefully managed (and managable).But it seems that BinaryBuilder is also regressing the ecosystem somewhat on these axes too (e.g JuliaLang/julia#33985 (comment) and JuliaGraphics/Gtk.jl#447 (comment)). However, when you're an important low-level package like this, you have to be attentive to these little details—things that
Pkg
itself gets to ignore because it's just the end application.I'm looking into a bit how to fix this, but opening the issue in advance as a place to track progress. I don't know specifically what this should look like yet, but some quick thoughts on various possible options for a roadmap:
.jll
files just fully declarative (so that the helper Module / function knows how to fill them in based on the contents of an Artifact file)Pkg
application into a subprocess where they won't pollute the.ji
fileThe text was updated successfully, but these errors were encountered: