Closed JackDunnNZ closed 1 year ago
This looks fixed on upcoming 1.9.1:
kristofferc$ ./julia-5412389f72/bin/julia --sysimage=sysimg.so -q
julia> Base.EXT_DORMITORY
Dict{Base.PkgId, Vector{Base.ExtensionId}} with 6 entries:
DataFrames [a93c6f00-e5… => [ExtensionId(BangBangDataFramesExt [d787bcad-b5…
StaticArrays [90137ffa-… => [ExtensionId(ConstructionBaseStaticArraysExt [8…
IntervalSets [8197267c-… => [ExtensionId(ConstructionBaseIntervalSetsExt [a…
ChainRulesCore [d360d2e… => [ExtensionId(BangBangChainRulesCoreExt [47e8a63…
TypedTables [9d95f2ec-7… => [ExtensionId(BangBangTypedTablesExt [dde14a2d-6…
StructArrays [09ab397b-… => [ExtensionId(BangBangStructArraysExt [d139770a-…
julia> length(methods(BangBang.implements))
10
julia> using StaticArrays
[ Info: Precompiling StaticArrays [90137ffa-7385-5640-81b9-e52037218182]
[ Info: Precompiling ConstructionBaseStaticArraysExt [8497ba20-d017-5d93-8a79-2639523b7219]
[ Info: Precompiling BangBangStaticArraysExt [a9f1882a-14fa-573e-a12d-824431257a23]
julia> length(methods(BangBang.implements))
12
Fantastic, thank you for checking!
Suppose that PackageA has an extension that depends on PackageB. If a system image is created containing PackageA, then if I use this system image and add and load PackageB, it seems like the extension for PackageA/PackageB is not triggered.
Is this the intended behavior or might something be going wrong on my end? This type of conditional loading does work with Requires.jl
Here is a quick example I was trying with BangBang.jl (as an arbitrary choice of package with an extension):
Testing on Julia 1.6.7 (so falling back to Requires.jl):
On 1.9.0:
So the extension hasn't been loaded as the new method definitions aren't present
Of course, and for completeness, if both packages are included in the system image then the extension is also loaded in the system image.