-
Notifications
You must be signed in to change notification settings - Fork 64
Description
Follow up to #318 about doing it the right way. (rather than just enough to fix the symptom)
From #317 @devmotion said:
but IMO it is the wrong fix. Instead one should apply esc only locally, wherever needed: currently definitions such as @non_differentiable Base.length(kwargs::AbstractVector) or @non_differentiable Base.length(rrule::AbstractVector) will lead to multiple arguments of the same name in the rrule and frule definitions.
@simeonschaub said in #319 (comment)_
This will still fail if one only does
using ChainRulesCore: @scalar_rule. I think it would be better to just interpolaterruledirectly into the AST.
We should do this.
and we should text it via addign to the isolated test modules just using ChainRulesCore: @scalar_rule, @non_differentiable
which brings as little into scope as possible