Add JET.jl static analysis tests#209
Conversation
This PR adds JET.jl-based static analysis testing to the RootedTrees.jl test suite, complementing the existing @inferred tests. Changes: - Add JET as a test dependency in test/Project.toml - Add @test_opt tests for core type-stable functions The JET tests verify optimization analysis for: - Core tree construction and properties (order, density, hash) - Iterator construction (RootedTreeIterator, SubtreeIterator) - ColoredRootedTree operations - RungeKuttaMethod and RosenbrockMethod construction Note: Some functions like `symmetry` use recursion which JET cannot fully optimize, but they are still type-stable as verified by the existing @inferred tests. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Thanks for preparing JET.jl tests. However, CI never passed in this PR and fails in
|
|
Yes sorry, this is a part of a series of changes related to improved static/interface testing. On these notes, I am the middle of a few things here:
This needs a fix in General. Julia on v1.10 only works with JET v0.9, v1.11 only JET v0.10, v1.12 only JET v0.11. General allows all Julia versions on all JET. So we need to fix this in the registry for Downgrade to work. So we're ignoring it on the repo right now, but I'll do that General registry fix ASAP because this'll help a lot of people who must be noticing a lot of issues trying to use JET because of the wrong versions 😅
JET tests are being moved to nopre setups. That PR was supposed to happen immediately after so I merged, but I ran out of hours 😅 . So that should be spawning in a second. When it's running on nopre that means pre is ignored for JET (because it tends to not have a valid JET version, it actually does right now but it's unstable and tends to give false positives/negatives).
See the Slack thread on this. JuliaFormatter is being removed, so for now it's at least ignored. Whether we go to Runic or just drop formatter... see the discussion it ended very unclear from the straw poll. |
JET.jl has strict Julia version requirements that were not properly reflected in the registry compat entries: - JET 0.9.x (v0.8.28-0.9.18) requires Julia 1.10 only - JET 0.9.19+ requires Julia 1.11 only - JET 0.10.x and 0.11.x require Julia 1.12 only The previous entries used unbounded ranges like "1.10.0-1" which allowed incompatible Julia versions. This caused issues when the resolver would select JET versions that don't work with the user's Julia version. See: SciML/RootedTrees.jl#209 (comment) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* [JET] Add upper bounds to julia compat entries JET.jl has strict Julia version requirements that were not properly reflected in the registry compat entries: - JET 0.9.x (v0.8.28-0.9.18) requires Julia 1.10 only - JET 0.9.19+ requires Julia 1.11 only - JET 0.10.x and 0.11.x require Julia 1.12 only The previous entries used unbounded ranges like "1.10.0-1" which allowed incompatible Julia versions. This caused issues when the resolver would select JET versions that don't work with the user's Julia version. See: SciML/RootedTrees.jl#209 (comment) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * [JET] Also cap older versions for better resolver behavior Cap older JET versions at their appropriate Julia versions: - JET 0.0.x: cap at Julia 1.6 (was 1.10) - JET 0.5-0.6.1: cap at Julia 1.8 (was 1.10) - JET 0.6.2-0.6.15: cap at Julia 1.8 (was 1.10) - JET 0.6.21-0.7.14: cap at Julia 1.8 (was 1.10) - JET 0.7.15-0.8.21: cap at Julia 1.9 (was 1.10) This ensures the resolver picks the appropriate JET version for each Julia version instead of potentially selecting older JET versions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Code <noreply@anthropic.com>
- Remove JET from test dependencies, load it dynamically in runtests.jl - JET tests only run on non-prerelease Julia versions (GROUP=all or GROUP=nopre) - Disable downgrade tests temporarily (if: false) pending upstream fixes - Add Pkg to test dependencies for dynamic package loading This follows the pattern used in other SciML packages like NonlinearSolve.jl where JET tests are excluded from prerelease Julia to avoid false positives from incomplete JET support on bleeding-edge Julia versions. Related: SciML#209 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove JET from test dependencies, load it dynamically in runtests.jl - JET tests only run on non-prerelease Julia versions (GROUP=all or GROUP=nopre) - Disable downgrade tests temporarily (if: false) pending upstream fixes - Add Pkg to test dependencies for dynamic package loading This follows the pattern used in other SciML packages like NonlinearSolve.jl where JET tests are excluded from prerelease Julia to avoid false positives from incomplete JET support on bleeding-edge Julia versions. Related: SciML#209 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove JET from test dependencies, load it dynamically in runtests.jl - JET tests only run on non-prerelease Julia versions (GROUP=all or GROUP=nopre) - Disable downgrade tests temporarily (if: false) pending upstream fixes - Add Pkg to test dependencies for dynamic package loading This follows the pattern used in other SciML packages like NonlinearSolve.jl where JET tests are excluded from prerelease Julia to avoid false positives from incomplete JET support on bleeding-edge Julia versions. Related: SciML#209 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove JET from test dependencies, load it dynamically in runtests.jl - JET tests only run on non-prerelease Julia versions (GROUP=all or GROUP=nopre) - Disable downgrade tests temporarily (if: false) pending upstream fixes - Add Pkg to test dependencies for dynamic package loading This follows the pattern used in other SciML packages like NonlinearSolve.jl where JET tests are excluded from prerelease Julia to avoid false positives from incomplete JET support on bleeding-edge Julia versions. Related: SciML#209 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove JET from test dependencies, load it dynamically in runtests.jl - JET tests only run on non-prerelease Julia versions (GROUP=all or GROUP=nopre) - Disable downgrade tests temporarily (if: false) pending upstream fixes - Add Pkg to test dependencies for dynamic package loading This follows the pattern used in other SciML packages like NonlinearSolve.jl where JET tests are excluded from prerelease Julia to avoid false positives from incomplete JET support on bleeding-edge Julia versions. Related: #209 Co-authored-by: ChrisRackauckas-Claude <noreply@anthropic.com>
Summary
This PR adds JET.jl-based static analysis testing to the RootedTrees.jl test suite, complementing the existing
@inferredtests.Changes:
@test_opttests for core type-stable functionsJET tests cover:
order,density,hash)RootedTreeIterator,SubtreeIterator)ColoredRootedTreeoperationsRungeKuttaMethodandRosenbrockMethodconstructionBackground
JET analysis was run on the package and found:
report_package("RootedTrees")completed with 0 errorssymmetry(inherent to tree-traversal algorithms)The package is already well-typed - these tests document and maintain that quality.
Test plan
Pkg.test()- all 580,761 tests passcc @ChrisRackauckas
🤖 Generated with Claude Code