-
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
What if lifted_getfield
on a tangent just called getproperty
#39
Conversation
@Keno Any objections? This should be fine, right? |
If it works, ok by me. |
I plan to set up some CI as soon as I figure out the problem on latest Julia nightly. Since this doesn't seem urgent, I'll probably hold off on this until then, so we can merge with some confidence. |
getproperty
lifted_getfield
on a tangent just called getproperty
Ah, this breaks down for |
We should consider adding that overload in CRC so this works. |
also fixes some issues with `getindex`, mainly that it didn't canonicalize tangents with NamedTuple backing, which I'd argue is a bug. It's also more consistent with `getproperty` now, so `tangent[:a]` returns `ZeroTangent()` instead of erroring if `tangent`'s backing doesn't have a field `a`. ref JuliaDiff/Diffractor.jl#39
also fixes some issues with `getindex`, mainly that it didn't canonicalize tangents with NamedTuple backing, which I'd argue is a bug. It's also more consistent with `getproperty` now, so `tangent[:a]` returns `ZeroTangent()` instead of erroring if `tangent`'s backing doesn't have a field `a`. ref JuliaDiff/Diffractor.jl#39
b321e6f
to
4b2bc2f
Compare
@Keno Any ideas about the hang on Windows? Is that worth investigating? (Failing job is https://github.com/JuliaDiff/Diffractor.jl/runs/3658202821?check_suite_focus=true for reference.) |
No idea. I've never tried it on windows. I'd say just disable the CI job for now. |
Semantically these are the same.
but lets see if this works out right