Skip to content

Add JET static analysis and type inference tests#31

Merged
ChrisRackauckas merged 1 commit into
SciML:mainfrom
ChrisRackauckas-Claude:static-improvements-20260108-030854
Jan 9, 2026
Merged

Add JET static analysis and type inference tests#31
ChrisRackauckas merged 1 commit into
SciML:mainfrom
ChrisRackauckas-Claude:static-improvements-20260108-030854

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Contributor

Summary

  • Add JET.jl static analysis tests to verify type stability of core functionality
  • Add @inferred tests to verify return type inference
  • Add JET as a test dependency with compat bounds

JET Analysis Results

The package was analyzed with JET.jl. Key findings:

Core functionality is type-stable:

  • @test_opt passes for all wrapper calls when using the non-fallback mode (FB=false)
  • JET.report_call shows no errors for the main code paths
  • Return types are correctly inferred

Known type instabilities (by design):

  • The fallback path (FB=true) has inherent type instability because it calls the unwrapped function directly via .obj[], which loses type information
  • Some runtime dispatch in the constructor is expected when building the tuple of FunctionWrappers from runtime type information
  • Some upstream issues exist in FunctionWrappers.jl itself (in reinit_wrapper/gen_fptr), which are not addressable in this package

Test Plan

  • All existing tests pass
  • New JET static analysis tests pass (7 tests)
  • New type inference tests pass (5 tests)

Changes

  • Project.toml: Add JET as test dependency with compat entry
  • test/runtests.jl: Add JET static analysis and type inference test sets

/cc @ChrisRackauckas

🤖 Generated with Claude Code

Comment thread Project.toml Outdated
Comment thread test/runtests.jl Outdated
@ChrisRackauckas-Claude ChrisRackauckas-Claude force-pushed the static-improvements-20260108-030854 branch from 5d8a428 to c9d1bb3 Compare January 9, 2026 11:09
@ChrisRackauckas ChrisRackauckas merged commit 0a43e4b into SciML:main Jan 9, 2026
7 checks passed
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