Skip to content

Commit

Permalink
precompile now works for abstract (but compilable) signatures
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofferC committed Apr 23, 2023
1 parent 32b6ae0 commit a648723
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/PackageCompiler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -353,10 +353,12 @@ function create_sysimg_object_file(object_file::String,
end
# println(ps)
ps = Core.eval(PrecompileStagingArea, ps)
# XXX: precompile doesn't currently handle overloaded nospecialize arguments very well.
# Skipping them avoids the warning.
ms = length(ps) == 1 ? Base._methods_by_ftype(ps[1], 1, Base.get_world_counter()) : Base.methods(ps...)
ms isa Vector || continue
@static if VERSION <= 1.9.0-beta1
# XXX: precompile doesn't currently handle overloaded nospecialize arguments very well.
# Skipping them avoids the warning.
ms = length(ps) == 1 ? Base._methods_by_ftype(ps[1], 1, Base.get_world_counter()) : Base.methods(ps...)
ms isa Vector || continue
end
precompile(ps...)
catch e
# See julia issue #28808
Expand Down

0 comments on commit a648723

Please sign in to comment.