Raise PrecompileTools compat floor to 1.2 to fix Downgrade CI#27
Merged
ChrisRackauckas merged 2 commits intoJun 17, 2026
Merged
Conversation
ExplicitImports 1.13+ (the package's declared test-dep floor is 1.14.0)
requires PrecompileTools "1.2.0 - 1" in the registry. With the previous
PrecompileTools = "1" compat (floor 1.0.0), the Downgrade job pins
PrecompileTools to 1.0.0, which forces ExplicitImports <= 1.8.0 and is
unsatisfiable against the 1.14.0 floor:
Unsatisfiable requirements detected for package ExplicitImports:
restricted by compatibility requirements with PrecompileTools to
versions: 1.0.0-1.8.0 or uninstalled — no versions left
Raising the floor to "1.2" matches what ExplicitImports actually needs.
PrecompileTools 1.2 still supports julia >= 1.6, so the package's
julia = "1.10" floor and its @compile_workload usage are unaffected.
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… 1.12
The JET 'error analysis', 'different numeric types', and 'complex numbers'
testsets failed under JET 0.11 / Julia 1.12 with 4 reports, all from
cov(::Matrix) (and cor(::Matrix), which calls it). Each report bottomed
out at the same Julia-1.12 LinearAlgebra inference artifact: broadcasting
(`.*`) over two contiguous matrix-column SubArrays forces broadcast's
`unaliascopy` path through `copyto_unaliased!` in LinearAlgebra
transpose.jl, where inference yields a `Union{Adjoint{T,Union{}},
Transpose{T,Union{}}}` and JET flags an "invalid builtin getfield". This
reproduces in a 7-line standalone function with no package code, so it is
a Julia/LinearAlgebra false positive, but it is straightforward to avoid
in source.
Rewrite both cov branches to accumulate each covariance entry with an
explicit index loop over the centered values instead of broadcasting over
column/row views. This sidesteps the unaliascopy path entirely (JET now
reports zero issues for both report_call and report_opt) and removes the
per-pair temporary allocation.
Also fix a latent correctness bug uncovered while doing this: the result
matrix was allocated as `zeros(float(real(eltype(X))), p, p)` — a real
matrix even for complex input. Whenever an off-diagonal covariance was
genuinely complex, assigning it into the real array threw InexactError.
The result is now `zeros(float(eltype(X)), ...)`, matching Statistics.cov
(verified against Statistics.jl for a complex matrix with complex
off-diagonals). Added a regression test for complex covariance matrices.
Verified locally: full suite passes on Julia 1.12.6 (455/455) and on the
1.10.11 floor (422 pass / 1 pre-existing broken), and all JET report_call
/ report_opt entry points from jet_tests.jl return zero reports on 1.12.
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
This PR fixes two
mainCI failures for LightweightStats.jl on the1channel (now Julia 1.12) / JET 0.11.1. Downgrade Tests resolution failure
The Downgrade Tests job on
mainfailed to resolve the test environment:Root cause:
ExplicitImports1.13+ requiresPrecompileTools = "1.2.0 - 1", but this package declaredPrecompileTools = "1"(floor1.0.0). The downgrade job pins every[compat]dep to its floor, pinningPrecompileToolsto1.0.0, which forcesExplicitImports <= 1.8.0— unsatisfiable against the declaredExplicitImports = "1.14.0"floor.Fix: Raise the compat floor to
PrecompileTools = "1.2". PrecompileTools 1.2 supportsjulia >= 1.6, so the package'sjulia = "1.10"floor and the@compile_workloadusage are unaffected.2. JET static-analysis failures (JET 0.11 / Julia 1.12)
The
JET error analysis,JET analysis with different numeric types, andJET analysis with complex numberstestsets failed with 4 reports, all originating fromcov(::Matrix)(andcor(::Matrix), which calls it). Each report bottomed out at the same Julia-1.12 LinearAlgebra inference artifact: broadcasting (.*) over two contiguous matrix-columnSubArrays forces broadcast'sunaliascopypath throughcopyto_unaliased!in LinearAlgebratranspose.jl, where inference yields aUnion{Adjoint{T,Union{}}, Transpose{T,Union{}}}and JET flags an "invalid builtin getfield". This reproduces in a ~7-line standalone function with no package code (a Julia/LinearAlgebra false positive), but is straightforward to avoid in source.Fix: Rewrite both
covbranches to accumulate each covariance entry with an explicit index loop over the centered values instead of broadcasting over column/row views. This sidesteps theunaliascopypath entirely — JET now reports zero issues for bothreport_callandreport_opt— and also removes the per-pair temporary allocation.Latent bug also fixed: the result matrix was allocated as
zeros(float(real(eltype(X))), p, p)— a real matrix even for complex input. Whenever an off-diagonal covariance was genuinely complex, assigning it into the real array threwInexactError. The result is nowzeros(float(eltype(X)), ...), matchingStatistics.cov. A regression test for complex covariance matrices was added.Local verification
Julia 1.12.6 (the
1channel) full suite, with JET 0.11.4:All
report_call/report_optentry points fromjet_tests.jlreturn zero reports on 1.12. Julia 1.10.11 floor full suite: 422 pass / 1 pre-existing broken (the gated JET@test_skip), no regressions. Complexcovverified againstStatistics.covfor a matrix with genuinely-complex off-diagonals (matches; old code threwInexactError).Downgrade resolve (Julia 1.10.11):
PrecompileTools=1.0.0fails (unsatisfiable),PrecompileTools=1.2.0resolves and loads cleanly.Please ignore until reviewed by @ChrisRackauckas.