-
Notifications
You must be signed in to change notification settings - Fork 31
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
adjustments to the latest master #284
Conversation
55a6d44
to
9883872
Compare
# This broke some time between 1.10 and 1.11-DEV.10001 | ||
@test isa(sin′′, Core.OpaqueClosure{Tuple{Float64}, Float64}) broken=VERSION>=v"1.11-" |
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.
oh yay!
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.
I don't know too much why these broken test cases have been fixed, but I guess it was probably because the previous (::∂☆recurse)(...)
implementation has the serious flaw (i.e. the generator uses function that hasn't been defined at the time when the generator function is defined)?
132f9bb
to
6eda0db
Compare
6764904
to
44a4308
Compare
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.
Pending getting CI working. (Not sure when i will have time to look at that)
This looks good.
if interp !== nothing | ||
cis.inferred = true | ||
@static if VERSION ≥ v"1.12.0-DEV.15" | ||
rettype = Any # ci.rettype # TODO revisit |
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.
Why? is inference broken?
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.
ci
no longer has rettype
.
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.
We probably need further tweak on this code, but maybe later.
src/codegen/reverse.jl
Outdated
else | ||
ci.inferred = true | ||
rettype = ci.rettype | ||
end | ||
ocm = ccall(:jl_new_opaque_closure_from_code_info, Any, (Any, Any, Any, Any, Any, Cint, Any, Cint, Cint, Any), |
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.
The signature of this c function changed
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.
That said, this should ideally use the Core.OpaqueClosure constructor
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #284 +/- ##
==========================================
- Coverage 55.29% 54.83% -0.46%
==========================================
Files 28 27 -1
Lines 2917 2945 +28
==========================================
+ Hits 1613 1615 +2
- Misses 1304 1330 +26 ☔ View full report in Codecov by Sentry. |
I will give them reviews quickly. |
It's really nice to have tests passing on the stable version! |
@@ -6,36 +6,34 @@ module stage2_fwd | |||
@test sin′(1.0) == cos(1.0) | |||
end | |||
let sin′′ = Diffractor.dontuse_nth_order_forward_stage2(Tuple{typeof(mysin), Float64}, 2) | |||
# This broke some time between 1.10 and 1.11-DEV.10001 | |||
@test isa(sin′′, Core.OpaqueClosure{Tuple{Float64}, Float64}) broken=VERSION>=v"1.11-" |
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.
These test cases about inferred OC types appear to work fine in v1.12, but they're still broken on v1.11. We might need to consider backporting some changes, or tweak the broken
condition here.
Many adjustments...