Skip to content

Fix NonlinearSolveBase QA: import ArrayInterface via its owner in SparseArrays ext - #1035

Merged
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:fix-nlsb-sparsearrays-ext-qa
Jul 11, 2026
Merged

ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:fix-nlsb-sparsearrays-ext-qa

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member

Note: This PR should be ignored until reviewed by @ChrisRackauckas.

Problem

GROUP=QA julia +1.11 -e 'using Pkg; Pkg.activate("lib/NonlinearSolveBase"); Pkg.test()' errors on master (reproduced on 3f64085 with Julia 1.11.9, SciMLTesting 1.8.0, ExplicitImports 1.15.0, Aqua 0.8.16, ArrayInterface 7.27.0): 15 passed, 2 errored.

all_qualified_accesses_via_owners: QualifiedAccessesFromNonOwnerException
- `ArrayInterface` has owner `ArrayInterface` but it was accessed from `NonlinearSolveBase`
  at ext/NonlinearSolveBaseSparseArraysExt.jl:25:37

all_qualified_accesses_are_public: NonPublicQualifiedAccessException
- `ArrayInterface` is not public in `NonlinearSolveBase` (same location)
- `is_extension_loaded` is not public in `NonlinearSolveBase.Utils` (line 11:7)
- `structural_sparse` is not public in `NonlinearSolveBase.Utils` (line 24:16)

Bisect

Introduced by 7ff3239 ("ArcLengthContinuation: consume jac/jac_prototype/sparsity/colorvec", PR #1025), which added Utils.structural_sparse (containing the NonlinearSolveBase.ArrayInterface.findstructralnz access) and Utils.is_extension_loaded(::Val{:SparseArrays}) to the SparseArrays extension. Verified with today's dependency versions: the parent commit f9444fa passes QA 17/17 in the identical environment, so this is a repo regression, not a new ExplicitImports/SciMLTesting release.

Fix

  • ext/NonlinearSolveBaseSparseArraysExt.jl: using ArrayInterface: ArrayInterface (a hard dep of NonlinearSolveBase; the ForwardDiff and LinearSolve extensions already import it this way) and call ArrayInterface.findstructralnz directly. findstructralnz is declared public in ArrayInterface 7.26+, so this satisfies both the owner and publicness checks with no ignore entry.
  • test/qa/qa.jl: add :is_extension_loaded and :structural_sparse to the existing all_qualified_accesses_are_public per-name ignore list. These are NonlinearSolveBase's own internal extension hooks defined via qualified Utils. names — exactly the pattern of the sibling hooks (make_sparse, condition_number, maybe_symmetric, maybe_pinv!!_workspace, sparse_or_structured_prototype) already on that list. No checks weakened, no ei_broken.

Verification (run locally on this branch)

  • GROUP=QA NonlinearSolveBase: 17/17 pass ("Testing NonlinearSolveBase tests passed")
  • GROUP=Core NonlinearSolveBase: all pass ("Testing NonlinearSolveBase tests passed")

Changed files were Runic-formatted.

🤖 Generated with Claude Code

…rseArrays ext

GROUP=QA for lib/NonlinearSolveBase errors on master (introduced by
7ff3239, PR SciML#1025, which added Utils.structural_sparse and
Utils.is_extension_loaded to the SparseArrays extension):

- all_qualified_accesses_via_owners: `ArrayInterface` accessed via
  `NonlinearSolveBase` instead of its owner
- all_qualified_accesses_are_public: `ArrayInterface`,
  `is_extension_loaded`, `structural_sparse` non-public accesses

Fix the first by importing ArrayInterface directly (it is a hard dep of
NonlinearSolveBase; the ForwardDiff/LinearSolve extensions already do
`using ArrayInterface: ArrayInterface`), so `findstructralnz` is now
reached through its owner, where it is declared public (7.26+).

`is_extension_loaded` and `structural_sparse` are NonlinearSolveBase's
own internal extension hooks defined via qualified `Utils.` names, the
same pattern as the sibling hooks (make_sparse, condition_number,
maybe_symmetric, ...) that already sit in the qa.jl
all_qualified_accesses_are_public ignore list; add them there alongside.

Co-Authored-By: Claude Fable 5 <[email protected]>
Co-Authored-By: Chris Rackauckas <[email protected]>
@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review July 11, 2026 09:24
@ChrisRackauckas
ChrisRackauckas merged commit a13d0d9 into SciML:master Jul 11, 2026
73 of 74 checks passed
ChrisRackauckas-Claude pushed a commit to ChrisRackauckas-Claude/NonlinearSolve.jl that referenced this pull request Jul 11, 2026
…_for_refactorization (SciML#1038); pick up the NLSB QA fix (SciML#1035)

construct_linear_solver's alias kwarg now defaults to nothing, deferring
to SciML#1038's alias_A_for_refactorization trait (owned-copy refactorization
buffer); an explicit LinearAliasSpecifier from a caller that owns A/b
outright (the inverse-Jacobian workspace) skips the defensive copy.

Co-Authored-By: Claude Fable 5 <[email protected]>
Co-Authored-By: Chris Rackauckas <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants