Fix precompilation on Julia 1.13 (Hessenberg method overwrites) - #182
Conversation
…senberg methods. Julia 1.13 backported eigencopy_oftype(::UpperHessenberg) and still ships a generic eigvals!(::UpperHessenberg) fallback (LinearAlgebra#1602 not backported). Defining those methods here triggers method-overwrite errors during precompilation. Restrict the pirates to Julia < 1.13. Co-authored-by: Cursor <cursoragent@cursor.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #182 +/- ##
=======================================
Coverage 95.73% 95.73%
=======================================
Files 11 11
Lines 1524 1524
=======================================
Hits 1459 1459
Misses 65 65 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
v"1.13.0-DEV" < v"1.13" is true, so the previous bound still defined eigencopy_oftype/eigvals! and failed precompilation on julia-pre CI. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Pushed a follow-up: the julia-pre failure was because |
On Julia 1.13-rc, LinearAlgebra's generic UpperHessenberg eigvals! fallback densifies and forwards permute/scale into GenericLinearAlgebra's StridedMatrix pirate; without absorbing those kwargs, BigFloat Hessenberg tests error. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Yes — on 1.13.0-rc* the LinearAlgebra densifying fallback is still present (#1602 is on `LinearAlgebra` `release-1.13` but not in the Julia rc pin yet), so `eigvals(::UpperHessenberg{BigFloat})` becomes `eigvals!(triu!(H.data); permute, scale)` and hits our `StridedMatrix` pirate. Pushed a fix: `_schur!(::UpperHessenberg)` now accepts/ignores `permute`/`scale` (and other kwargs), matching the old comment that these should be absorbed. |
Co-authored-by: Cursor <cursoragent@cursor.com>
|
I think these changes are redundant. See the top post in #180 |
|
Oh that's probably better. |
Summary
LinearAlgebra.eigencopy_oftype(::UpperHessenberg, ...)on Julia ≥ 1.13 (already in LinearAlgebra; backported from 1.14).LinearAlgebra.eigvals!(::UpperHessenberg, ...)on Julia ≥ 1.13 (generic fallback still present because JuliaLang/LinearAlgebra.jl#1602 was not backported; overwriting it fails precompilation).Root cause
Precompiling GenericLinearAlgebra 0.4.0 on Julia 1.13 fails with:
and, after guarding only
eigencopy_oftype, the same error foreigvals!(::UpperHessenberg).Related: #180, #181 (partial fix for
eigencopy_oftypeonly; Julia-pre CI still fails on theeigvals!overwrite).Notes
UpperHessenbergeigensolves go through LinearAlgebra's LAPACK methods.UpperHessenbergsupport on 1.13 still needs a LinearAlgebra #1602 backport (or Julia 1.14).Test plan
eigvals!guardMade with Cursor