Skip to content

Commit b7cfbd8

Browse files
Add version guards to Enzyme test files to prevent loading on Julia 1.12
Added defensive guards at the top of Enzyme test files to explicitly skip tests on Julia 1.12+ prerelease versions. This prevents accidental Enzyme loading if these test files are run directly outside of the normal test harness. While the CI workflow and test/runtests.jl already prevent Enzyme tests from running on v1.12, these file-level guards provide an additional safety layer and make the version requirement explicit in each test file. Affected files: - test/enzyme/autodiff_events.jl - test/enzyme/discrete_adjoints.jl 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 02519e0 commit b7cfbd8

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

test/enzyme/autodiff_events.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# Skip Enzyme tests on Julia 1.12+ prerelease versions
2+
if !isempty(VERSION.prerelease)
3+
@warn "Skipping Enzyme tests on Julia prerelease version $(VERSION)"
4+
exit(0)
5+
end
6+
17
using SciMLSensitivity
28
using OrdinaryDiffEq, OrdinaryDiffEqCore, FiniteDiff, Test
39
using Zygote

test/enzyme/discrete_adjoints.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# Skip Enzyme tests on Julia 1.12+ prerelease versions
2+
if !isempty(VERSION.prerelease)
3+
@warn "Skipping Enzyme tests on Julia prerelease version $(VERSION)"
4+
exit(0)
5+
end
6+
17
using Enzyme, OrdinaryDiffEqTsit5, StaticArrays, DiffEqBase, ForwardDiff, Test
28

39
function lorenz!(du, u, p, t)

0 commit comments

Comments
 (0)