You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Use public APIs for AutoDePSpecialize wrappers - #1121
construct the AutoDePSpecialize opaque callable through the public RespecializeParams.OpaqueVoid API and reuse the existing dual-aware wrapfun_iip path
derive FunctionWrappersWrappers' concrete single-cache storage type through its public cache-mode API, then use its public typed constructor
replace private SciMLBase checks with problem_type/StandardNonlinearProblem and SymbolicIndexingInterface.all_symbols
add a direct ForwardDiff dual-call regression test and bump NonlinearSolveBase to 2.39.1
This removes the ExplicitImports QA violations without making internal helper names public. The FunctionWrappersWrappers compatibility floor is raised to 1.9.3, where the required public constructor is available.
With current compatible dependency versions on Julia 1.12:
NonlinearSolveBase QA: 20 passed
NonlinearSolveBase Core: passed, including AutoDePSpecialize opaque-p (25 passed)
With the new compatibility floors pinned (FunctionWrappersWrappers 1.9.3, SciMLBase 3.37.0, SymbolicIndexingInterface 0.3.43):
NonlinearSolveBase QA: 20 passed
NonlinearSolveBase Core: passed, including AutoDePSpecialize opaque-p (25 passed)
Commands:
NONLINEARSOLVE_TEST_GROUP=QA julia +1.12 --project=. -e 'using Pkg; Pkg.test()'
NONLINEARSOLVE_TEST_GROUP=Core julia +1.12 --project=. -e 'using Pkg; Pkg.test()'
Whole-repository Runic 1.7.0 and git diff --check both completed with exit code 0.
The root NonlinearSolve Core group was also run. It reached the pre-existing continuation allocation assertions, where sweep_per_step(prob_big) measured 92.64 bytes against <48 and arclength_per_step(prob_big) measured 48.0 against <48. The sweep result reproduced unchanged on clean upstream/master; this PR does not alter those continuation drivers or their test thresholds.
Superseded by #1124, which takes the route @ChrisRackauckas asked for: rather than reconstructing these objects through indirect public surface, promote each name at its owning package and then use it directly.
Two findings from a local QA run on clean master that change the picture here:
RespecializeParams.wrap_void_opaque is already exported and documented in the released RespecializeParams 1.x, and ExplicitImports never flagged it. The rewrite of that path in this PR was not required.
Clean master has four non-public accesses, not two — ExplicitImports reports only the first failing module, so NonlinearSolveBaseForwardDiffExt's violations were masking SciMLBase.ImmutableNonlinearProblem and SciMLBase.has_sys in src/autospecialize.jl.
Also worth recording: the problem_type(prob) isa StandardNonlinearProblem substitution in this PR is not equivalent to the guard it replaces. IntervalNonlinearProblem also defaults to problem_type = StandardNonlinearProblem() and is also <: AbstractNonlinearProblem, so it would newly pass the guard and then reach prob.u0, a field it does not have.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Summary
RespecializeParams.OpaqueVoidAPI and reuse the existing dual-awarewrapfun_iippathproblem_type/StandardNonlinearProblemandSymbolicIndexingInterface.all_symbolsThis removes the ExplicitImports QA violations without making internal helper names public. The FunctionWrappersWrappers compatibility floor is raised to 1.9.3, where the required public constructor is available.
Closes #1118.
Supersedes #1073.
Validation
With current compatible dependency versions on Julia 1.12:
QA: 20 passedCore: passed, includingAutoDePSpecialize opaque-p(25 passed)With the new compatibility floors pinned (
FunctionWrappersWrappers1.9.3, SciMLBase 3.37.0, SymbolicIndexingInterface 0.3.43):QA: 20 passedCore: passed, includingAutoDePSpecialize opaque-p(25 passed)Commands:
Whole-repository Runic 1.7.0 and
git diff --checkboth completed with exit code 0.The root NonlinearSolve
Coregroup was also run. It reached the pre-existing continuation allocation assertions, wheresweep_per_step(prob_big)measured 92.64 bytes against<48andarclength_per_step(prob_big)measured 48.0 against<48. The sweep result reproduced unchanged on cleanupstream/master; this PR does not alter those continuation drivers or their test thresholds.