Fix Julia 1.12 compatibility issue with ODEInterface_jll loading#36
Open
ChrisRackauckas-Claude wants to merge 1 commit intoluchr:masterfrom
Open
Conversation
In Julia 1.12, stricter module scoping rules caused ODEInterface_jll to not be accessible after being loaded with @eval inside a function. Changes: - Changed from 'using ODEInterface_jll' to 'import ODEInterface_jll' in loadODESolvers() to ensure proper module-level import - Updated trytofindjlllib() to access the imported module using @eval with QuoteNode for symbol interpolation This fix ensures all 481 tests pass on Julia 1.12 while maintaining backward compatibility with earlier Julia versions. Fixes issues where dynamic library loading would fail with UndefVarError(:ODEInterface_jll) on Julia 1.12. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
While this works, I would suggest going fully into the JLL route as the older build system has mostly been removed by all packages at this point. A bump to v1.10 and making JLL loading non-dynamic would greatly decrease load latency, precompilation support, and just simplify the code a lot. But this at least keeps the package working. |
|
Bump |
1 similar comment
|
Bump |
|
Bump? This is still causing downstream failures. |
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
Fixes Julia 1.12 compatibility issue where
ODEInterface_jllmodule loading fails withUndefVarError.Problem
In Julia 1.12, stricter module scoping rules caused
ODEInterface_jllto not be accessible after being loaded with@evalinside theloadODESolvers()function. This resulted in all dynamic library loading tests failing with:Solution
File modified:
src/DLSolvers.jlusing ODEInterface_jlltoimport ODEInterface_jllinloadODESolvers()to ensure proper module-level import (lines 166-169)trytofindjlllib()to access the imported module using@evalwithQuoteNodefor symbol interpolation (lines 78-81)Testing
All 481 tests now pass on Julia 1.12.0:
The fix maintains backward compatibility with Julia versions >= 1.3.
Related
This issue was identified in ModelingToolkit.jl CI runs on Julia 1.12:
https://github.com/SciML/ModelingToolkit.jl/actions/runs/18457125412/job/52580500899?pr=3957#step:6:1803
🤖 Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com