Skip to content
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

Fix some ChainRulesCore invalidations #530

Merged
merged 2 commits into from
Mar 17, 2022
Merged

Conversation

timholy
Copy link
Member

@timholy timholy commented Mar 17, 2022

ChainRulesCore gets loaded by a lot of packages. Its fallback methods

==(a, b::AbstractThunk)
==(a::AbstractThunk, b)

invalidate a lot of things, including much of the Serialization stdlib. But at least we can protect JuliaInterpreter.

@timholy
Copy link
Member Author

timholy commented Mar 17, 2022

Before:

 inserting ==(a::AbstractThunk, b) in ChainRulesCore at /home/tim/.julia/packages/ChainRulesCore/IzITE/src/tangent_types/thunks.jl:28 invalidated:
   backedges: 1: superseding ==(x, y) in Base at Base.jl:119 with MethodInstance for ==(::Any, ::Task) (4 children)
              2: superseding ==(x, y) in Base at Base.jl:119 with MethodInstance for ==(::Any, ::JuliaInterpreter.SlotNumber) (7 children)
              3: superseding ==(x, y) in Base at Base.jl:119 with MethodInstance for ==(::Any, ::Base.UUID) (9 children)
              4: superseding ==(x, y) in Base at Base.jl:119 with MethodInstance for ==(::Any, ::FileWatching._FDWatcher) (22 children)
              5: superseding ==(x, y) in Base at Base.jl:119 with MethodInstance for ==(::Any, ::Symbol) (280 children)

After:

 inserting ==(a::AbstractThunk, b) in ChainRulesCore at /home/tim/.julia/packages/ChainRulesCore/IzITE/src/tangent_types/thunks.jl:28 invalidated:
   backedges: 1: superseding ==(x, y) in Base at Base.jl:119 with MethodInstance for ==(::Any, ::Task) (4 children)
              2: superseding ==(x, y) in Base at Base.jl:119 with MethodInstance for ==(::Any, ::Base.UUID) (9 children)
              3: superseding ==(x, y) in Base at Base.jl:119 with MethodInstance for ==(::Any, ::FileWatching._FDWatcher) (22 children)

@codecov
Copy link

codecov bot commented Mar 17, 2022

Codecov Report

Merging #530 (f19c224) into master (79e3d2b) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #530      +/-   ##
==========================================
+ Coverage   87.40%   87.41%   +0.01%     
==========================================
  Files          12       12              
  Lines        2470     2472       +2     
==========================================
+ Hits         2159     2161       +2     
  Misses        311      311              
Impacted Files Coverage Δ
src/commands.jl 93.45% <100.00%> (ø)
src/utils.jl 88.28% <100.00%> (+0.05%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 79e3d2b...f19c224. Read the comment docs.

Co-authored-by: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com>
@timholy timholy merged commit a8e450c into master Mar 17, 2022
@timholy timholy deleted the teh/crc_invalidations branch March 17, 2022 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants