Closed Vaibhavdixit02 closed 1 month ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 100.00%. Comparing base (
733a26a
) to head (7cde295
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I'll review tomorrow, please wait for me
Sure
Thanks, I wasn't completely sure what you meant by it in the chat
I'll wait for @gdalle to take a look to make sure it doesn't affect DI
The AutoModelingToolkit
struct in ADTypes v0.2.7 was as follows, so this is the full API we want to deprecate but with meaningful fallbacks:
https://github.com/SciML/ADTypes.jl/blob/9f17b8227afdb12cbeb0faa7edc18abd5ffcae0c/src/ADTypes.jl#L151-L164
@ChrisRackauckas is right that the deprecation logic wasn't correct, so my last commit fixes it. We still generate a deprecation warning, which will be visible to users if such warnings are enabled, but we fall back on the correct version of the Symbolics backend.
@Vaibhavdixit02 what do you think? I took cues from https://invenia.github.io/blog/2022/06/17/deprecating-in-julia/
Why did you change it back to being incorrect? The point is that there was a version without kwargs before.
My fallbacks handle every version that there was before, with and without kwargs. Both will give the correct result, but both will be deprecated.
The old struct had a Base.@kwdef
and the keywords had default values, but I also take care of the standard struct constructor with positional arguments and no default values.
I didn't see the other dispatch. This should work then.
Let's wait for Vaibhav to test it locally with OptimizationBase before merging
Checklist
Additional context
I was overloading the constructor in OptimizationBase since the deprecation here wasn't sufficient, leading to re-precompilation. I couldn't find a way to use
@deprecated
for this so this'll have to do.