-
-
Notifications
You must be signed in to change notification settings - Fork 271
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
Refactor Pkg.BinaryPlatforms to avoid invalidations, keep types #3742
Refactor Pkg.BinaryPlatforms to avoid invalidations, keep types #3742
Conversation
After this pull request, the only remaining invalidations relate to 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is my favorite attempt so far!
The main breaking change is that
A complementary change on the |
103f2c5
to
4064a14
Compare
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 |
1 similar comment
This needs to reviewed again in light of BinaryBuilder2 and other fixes to invalidations. In short, there are fewer uses of |
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
typethat is distinct from
Base.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 in#3702
Fixes #3702 (in part).