Skip to content

fix: JET failure on Julia 1.13 (Array(::CDFVariable) inferred as Union{Nothing,...}) - #68

Merged
Beforerr merged 1 commit into
mainfrom
fix/jet-julia-1.13
Sep 30, 2026
Merged

Beforerr merged 1 commit into
mainfrom
fix/jet-julia-1.13

Conversation

@Beforerr

Copy link
Copy Markdown
Member

Julia 1 on CI now resolves to 1.13.1, where JET reports 4 errors in all/any on CDFVariable (src/variable.jl:81-82): Array(var::CDFVariable) infers as Union{Nothing, AbstractArray} because DiskArrays.readblock! on an abstract CDFVariable may resolve to DiskArrays methods returning nothing. Seen in run 36763211390; reproduced locally on origin/main with Julia 1.13.1.

Fix: Array and _record return their locally allocated dest instead of readblock!'s return value. Full test suite passes on 1.13.1.

…Julia 1.13

On Julia 1.13, inference of DiskArrays.readblock! for an abstract CDFVariable
widens to Union{Nothing, AbstractArray}, so JET flags all/any on CDFVariable.
@codecov

codecov Bot commented Sep 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions

Copy link
Copy Markdown
Contributor

Benchmark Results (Julia v1)

Time benchmarks
main 0f858bf... main / 0f858bf...
elx/full_load 0.0342 ± 0.0053 ms 0.0317 ± 0.0018 ms 1.08 ± 0.18
elx/sum_array 2.84 ± 0.75 μs 6.88 ± 1.7 μs 0.413 ± 0.15
elx/sum_lazy 5.22 ± 3.9 μs 6.76 ± 1.4 μs 0.772 ± 0.6
elx/sum_var_access 7.03 ± 1.3 μs 5.16 ± 4.5 μs 1.36 ± 1.2
elx/var_access 0.19 ± 0.001 μs 0.211 ± 0.01 μs 0.9 ± 0.043
mms/full_load 26.2 ± 12 μs 18.8 ± 1.9 μs 1.39 ± 0.65
mms/sum_array 0.0763 ± 0.0027 s 0.0769 ± 0.0046 s 0.991 ± 0.069
mms/sum_slice 2.96 ± 0.22 ms 2.87 ± 0.28 ms 1.03 ± 0.13
mms/sum_var_access 2.98 ± 0.22 ms 2.85 ± 0.26 ms 1.05 ± 0.12
mms/var_access 0.07 ± 0.01 μs 0.07 ± 0 μs 1 ± 0.14
time_to_load 0.268 ± 0.015 s 0.296 ± 0.013 s 0.905 ± 0.065
Memory benchmarks
main 0f858bf... main / 0f858bf...
elx/full_load 0.217 k allocs: 24.8 kB 0.217 k allocs: 24.8 kB 1
elx/sum_array 12 allocs: 28 kB 12 allocs: 28 kB 1
elx/sum_lazy 12 allocs: 28 kB 12 allocs: 28 kB 1
elx/sum_var_access 14 allocs: 28.3 kB 14 allocs: 28.3 kB 1
elx/var_access 1 allocs: 0.234 kB 1 allocs: 0.234 kB 1
mms/full_load 0.065 k allocs: 6.45 kB 0.065 k allocs: 6.45 kB 1
mms/sum_array 1.04 k allocs: 31.7 MB 1.04 k allocs: 31.7 MB 1
mms/sum_slice 0.069 k allocs: 1.29 MB 0.069 k allocs: 1.29 MB 1
mms/sum_var_access 0.069 k allocs: 1.29 MB 0.069 k allocs: 1.29 MB 1
mms/var_access 1 allocs: 0.219 kB 1 allocs: 0.219 kB 1
time_to_load 0.2 k allocs: 11.8 kB 0.2 k allocs: 11.8 kB 1

@Beforerr
Beforerr merged commit 36e491e into main Sep 30, 2026
6 checks passed
@Beforerr
Beforerr deleted the fix/jet-julia-1.13 branch September 30, 2026 20:11
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.

1 participant