fix method overwriting during precompilation #1058
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently https://github.com/SciML/SciMLBase.jl/blob/3972f76deeb967dacae300220c350c28f7253059/src/alg_traits.jl#L306 defines the
supports_opt_cache_interfacein SciMLBase and in OptimizationBase we haveOptimization.jl/lib/OptimizationBase/src/OptimizationBase.jl
Lines 18 to 22 in d32d3f9
which means that the
supports_opt_cache_interfacein OptimizationBase currently uses the one in SciMLBase.This is an issue because all optimizers define overloads for both
SciMLBase.supports_opt_cache_interface&OptimizationBase.supports_opt_cache_interface, causing method overwriting.Based on SciML/SciMLBase.jl#1154 (comment) I understand that
supports_opt_cache_interfaceshould be owned by OptimizationBase, so I changed all the optimizers to use that one.@ChrisRackauckas Is this okay?