Skip to content

Allow-list QRCompactWY instead of avoiding internal QR types - #392

Merged
ChrisRackauckas merged 1 commit into
SciML:mainfrom
ChrisRackauckas-Claude:agent/fix-qr-public-api
Jul 30, 2026
Merged

Allow-list QRCompactWY instead of avoiding internal QR types#392
ChrisRackauckas merged 1 commit into
SciML:mainfrom
ChrisRackauckas-Claude:agent/fix-qr-public-api

Conversation

@ChrisRackauckas-Claude

@ChrisRackauckas-Claude ChrisRackauckas-Claude commented Jul 15, 2026

Copy link
Copy Markdown
Member

Ignore this PR until it has been reviewed by @ChrisRackauckas.

What changed

Rebased on main and inverted the approach: instead of routing around LinearAlgebra.QRCompactWY, use it directly and mark it as allowed in the QA config.

  • restore concrete-type rewrapping in LinearAlgebra.qr(::ComponentMatrix) and ArrayInterface.qr_instance(::ComponentMatrix) (reverts the workaround merged in Upgrade ComponentArrays QA to SciMLTesting 2.4 #394)
  • add :QRCompactWY to the all_qualified_accesses_are_public ignore list in test/qa/qa.jl
  • add a _rewrap_qr(::LinearAlgebra.QR, ax) branch so non-BLAS eltypes (e.g. BigFloat) keep the ComponentMatrix wrapper too, with a regression test

Why

QRCompactWY is genuinely not public LinearAlgebra API, but rewrapping by concrete factorization type is the direct way to keep the ComponentMatrix wrapper on the factors. Allow-listing the one non-public name is simpler than the qr!-on-a-0x0-instance indirection.

Verified locally that the allow-list entry is load-bearing: with it removed, QA errors with

`QRCompactWY` is not public in `LinearAlgebra` but it was imported from `LinearAlgebra` at src/linear_algebra.jl:41:29

Local checks (Julia 1.12.4)

  • GROUP=QA: 19 passed, 0 failed
  • GROUP=Core: passed; math_tests.jl 102/102
  • Runic v1.7.0 --check
  • GROUP=Downstream: 23 passed, 1 broken (the pre-existing @test_broken at test/Downstream/diffeq_tests.jl:31)

Please ignore this draft until it has been reviewed by @ChrisRackauckas.

Copy link
Copy Markdown
Member Author

Audit scratchpad for commit 18d0735a5f7f589ffad7288b42eb5241fbfb1f13:

  • Reproduced QA on Julia 1.12: ExplicitImports rejected non-public LinearAlgebra.QRCompactWY.
  • Bisected the first bad commit to f37b6e7 (Make lu/qr of ComponentMatrix preserve the wrapper on factors #391).
  • Replaced the internal type dependency with the public qr! / qr path and added the BigFloat regression.
  • Core, QA, Downstream, and Runic passed locally.
  • All 20 PR checks are green.

No test was skipped or weakened.

Rewrap the QR factorization by concrete type again so `qr`/`qr_instance` on a
ComponentMatrix keep the wrapper on the factors, and add `:QRCompactWY` to the
QA ExplicitImports ignore list rather than routing around the non-public name.
Also cover the generic `QR` path so non-BLAS eltypes (BigFloat) keep the
wrapper too.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
@ChrisRackauckas-Claude ChrisRackauckas-Claude changed the title Avoid internal QR factorization types Allow-list QRCompactWY instead of avoiding internal QR types Jul 30, 2026
@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review July 30, 2026 10:40
@ChrisRackauckas
ChrisRackauckas merged commit 880c448 into SciML:main Jul 30, 2026
20 checks passed
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