Add JET.jl static analysis tests and improve type stability#583
Merged
ChrisRackauckas merged 7 commits intoJan 12, 2026
Merged
Conversation
- Add function barrier pattern to DataDrivenProblem constructor for type stability - Add JET.jl static analysis tests for key functions - Configure JET tests to run in CI environments - Add JET as a test dependency with broad version compat The new `_construct_datadrivenproblem` internal function ensures that the type parameters (cType, probType) are known at compile time through Val wrappers, improving type stability of problem construction. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
4954c37 to
5b61610
Compare
- Create test/nopre/ directory with dedicated Project.toml for JET - Add activate_nopre_env() function in runtests.jl - Remove JET from main Project.toml extras/targets/compat - Add nopre test group to CI matrix, excluded from Julia pre-release - This matches OrdinaryDiffEq's pattern for tests that shouldn't run on pre Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
5b61610 to
aea43a6
Compare
The eval_expresssion field name is a pre-existing typo in the public API. Fixing it would be a breaking change, so we allow it in typos. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The _construct_datadrivenproblem function has runtime dispatch in _promote due to broadcasting with abstract element types. This is a pre-existing type stability issue, not a regression. Marking the test as broken until the underlying issue is fixed. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Use Set comparison for basis evaluation tests to handle non-deterministic ordering from Symbolics.jl - Remove broken=true from JET test since it now passes Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Use sort() instead of Set() for basis evaluation comparison (Set doesn't support isapprox) - Mark JET internal constructor test as broken only on Julia < 1.11 (runtime dispatch in _promote is fixed in newer Julia versions) Co-Authored-By: Claude Opus 4.5 <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.
Summary
DataDrivenProblemconstructor for improved type stabilityChanges
Type Stability Improvement
The new
_construct_datadrivenprobleminternal function ensures that the type parameters (cType,probType) are known at compile time throughValwrappers, improving type stability of problem construction. This follows the function barrier pattern recommended for dealing with runtime-determined type parameters.JET Tests
Added static analysis tests that verify type stability of:
The JET tests only run in CI environments (when
CI=trueorRUN_JET_TESTS=true) to avoid adding overhead to local development.Test plan
Note: There is a pre-existing test failure in the Basis Manipulation tests due to non-deterministic ordering in Symbolics.jl (the elements are correct but in different order). This is unrelated to this PR.
cc @ChrisRackauckas
🤖 Generated with Claude Code