Skip to content

Fix precompilation on Julia 1.13 (Hessenberg method overwrites) - #182

Closed
ChrisRackauckas-Claude wants to merge 4 commits into
JuliaLinearAlgebra:masterfrom
ChrisRackauckas-Claude:fix-julia-1.13-precompile
Closed

Fix precompilation on Julia 1.13 (Hessenberg method overwrites)#182
ChrisRackauckas-Claude wants to merge 4 commits into
JuliaLinearAlgebra:masterfrom
ChrisRackauckas-Claude:fix-julia-1.13-precompile

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown

Summary

  • Stop defining LinearAlgebra.eigencopy_oftype(::UpperHessenberg, ...) on Julia ≥ 1.13 (already in LinearAlgebra; backported from 1.14).
  • Stop defining LinearAlgebra.eigvals!(::UpperHessenberg, ...) on Julia ≥ 1.13 (generic fallback still present because JuliaLang/LinearAlgebra.jl#1602 was not backported; overwriting it fails precompilation).
  • Bump to 0.4.1 for registration.

Root cause

Precompiling GenericLinearAlgebra 0.4.0 on Julia 1.13 fails with:

WARNING: Method definition eigencopy_oftype(...UpperHessenberg...) in LinearAlgebra overwritten in GenericLinearAlgebra
ERROR: Method overwriting is not permitted during Module precompilation.

and, after guarding only eigencopy_oftype, the same error for eigvals!(::UpperHessenberg).

Related: #180, #181 (partial fix for eigencopy_oftype only; Julia-pre CI still fails on the eigvals! overwrite).

Notes

  • On Julia 1.13+, BlasFloat UpperHessenberg eigensolves go through LinearAlgebra's LAPACK methods.
  • Full generic-UpperHessenberg support on 1.13 still needs a LinearAlgebra #1602 backport (or Julia 1.14).
  • This unblocks packages such as ExponentialUtilities whose Julia-pre CI fails solely because GenericLinearAlgebra cannot precompile.

Test plan

Made with Cursor

…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

codecov Bot commented Aug 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 95.73%. Comparing base (2f53d98) to head (bd8139e).

Files with missing lines Patch % Lines
src/eigenGeneral.jl 50.00% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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>
@ChrisRackauckas-Claude

Copy link
Copy Markdown
Author

Pushed a follow-up: the julia-pre failure was because v\"1.13.0-DEV\" < v\"1.13\" is true, so the guards never fired on nightlies. Switched both bounds to v\"1.13.0-\".

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>
@ChrisRackauckas-Claude

Copy link
Copy Markdown
Author

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.

Comment thread src/eigenGeneral.jl Outdated
Co-authored-by: Cursor <cursoragent@cursor.com>
@andreasnoack

Copy link
Copy Markdown
Member

I think these changes are redundant. See the top post in #180

@ChrisRackauckas

Copy link
Copy Markdown
Member

Oh that's probably better.

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.

3 participants