Closed mkitti closed 2 days ago
After this pull request, the only remaining invalidations relate to UnstableIO
.
julia> using SnoopCompileCore
julia> invalidations = @snoopr begin
using Pkg
Pkg.activate(".")
end;
Activating project at `~/src/Pkg.jl`
julia> using SnoopCompile
[ Info: Precompiling SnoopCompile [aa65fe97-06da-5843-b5b1-d5d13cad87d2]
julia> invalidation_trees(invalidations)
1-element Vector{SnoopCompile.MethodInvalidations}:
inserting print(io::Pkg.UnstableIO, arg::Union{SubString{String}, String}) @ Pkg ~/src/Pkg.jl/src/Pkg.jl:49 invalidated:
backedges: 1: superseding print(xs...) @ Base coreio.jl:3 with MethodInstance for print(::Any, ::String) (2 children)
2: superseding print(io::IO, s::Union{SubString{String}, String}) @ Base strings/io.jl:250 with MethodInstance for print(::IO, ::String) (362 children)
1 mt_cache
The main breaking change is that Linux
is no longer a subtype of Base.BinaryPlatforms.AbstractPlatform
, henceforth referred to as BBP.AbstractPlatform
.
BBP.AbstractPlatform
was meant to ease the implementation of Pkg.BinaryPlatforms
. Now BBP.AbstractPlatform
has no purpose if this is merged. BBP.Platform
would be its only subtype.
A complementary change on the Base
side would be to define methods for BBP.Platform
rather than BBP.AbstractPlatform
. After doing so, BBP.AbstractPlatform
may be free again to act as a common abstract parent type for BBP.Platform
and the OS-specific types.
The invalidation issue has been resolved.
Given @staticfloat's approval, if you resolve the conflicts here I can merge it if green @mkitti
This needs to reviewed again in light of BinaryBuilder2 and other fixes to invalidations.
In short, there are fewer uses of AbstractPlatform
in the system image now. Particularly I changed a Dict{AbstractPlatform}
to a Dict{Platform}
.
This needs to reviewed again in light of BinaryBuilder2 and other fixes to invalidations.
In short, there are fewer uses of AbstractPlatform
in the system image now. Particularly I changed a Dict{AbstractPlatform}
to a Dict{Platform}
.
This is my third attempt to address invalidations caused by Pkg.BinaryPlatforms.
The prior attempts were
In this pull request, I introduce a new
Pkg.BinaryPlatforms.AbstractPlatform
type that is distinct fromBase.BinaryPlatforms.AbstractPlatform
. The types here,Linux
,Windows
,MacOS
, andFreeBSD
subtypePkg.BinaryPlatforms.AbstractPlatform
.Because of this, these types no longer invalidate any
Base
methods as detailed in3702
Fixes #3702 (in part).