DiffRules.jl icon indicating copy to clipboard operation
DiffRules.jl copied to clipboard

Package extensions

Open aplavin opened this issue 1 year ago • 1 comments

This package defines rules for functions from LogExpFunctions, NaNMath, and SpecialFunctions packages, in addition to Base. Looking at https://github.com/JuliaDiff/DiffRules.jl/blob/master/src/rules.jl, their rules are pretty self-contained (*) and can easily be turned into package extensions to enable using DiffRules as a dependency in other lightweight packages. Would you support and accept such a PR turning them into weakdeps?

(*) One exception: a SpecialFunctions function used in a NaNMath rule definition, https://github.com/JuliaDiff/DiffRules.jl/blob/8842177391b07dcd8234ac7612b9ca8ca72d28e0/src/rules.jl#L276.

aplavin avatar Dec 08 '24 13:12 aplavin

My impression from https://github.com/JuliaDiff/DiffRules.jl/issues/90 was that the current design doesn't allow to define rules in extensions.

devmotion avatar Dec 08 '24 21:12 devmotion