Allow Symbolics 6 by compiling out the Symbolics extension#149
Merged
Conversation
The FastInterpolationsSymbolicsExt weak compat pinned Symbolics = "7", which forces the entire environment to Symbolics 7 whenever Symbolics is present (weak compat is enforced even when the extension is unused). This made FastInterpolations 0.4.x unresolvable in ecosystems still on the Symbolics 6 / SymbolicUtils 3 / ModelingToolkit 9 generation (e.g. FUSE via ThermalSystemModels), breaking downstream builds. Guard the extension body behind `isdefined(SymbolicUtils, :TypeT)` (the SymbolicUtils 4 API the extension relies on) so it compiles out as a no-op on the older generation, and widen the weak compat to Symbolics = "6, 7". Symbolics 7 keeps full symbolic-interpolation functionality; Symbolics 6 environments can install FastInterpolations with the extension simply inactive. Numeric interpolation is unaffected on either generation. Verified: precompiles as a no-op under Symbolics 6.58 / SymbolicUtils 3.32 and precompiles + functions under Symbolics 7.26 / SymbolicUtils 4. Co-authored-by: Cursor <cursoragent@cursor.com>
Indent the guarded extension body inside the `@static if` block to satisfy the repo's Runic formatting check. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
FastInterpolations.jl BenchmarksAll benchmarks (50 total, click to expand)
This comment was automatically generated by Benchmark workflow. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #149 +/- ##
==========================================
+ Coverage 96.40% 96.56% +0.16%
==========================================
Files 148 148
Lines 12269 12272 +3
==========================================
+ Hits 11828 11851 +23
+ Misses 441 421 -20
🚀 New features to boost your workflow:
|
…erivatives, nameof) Add coverage for previously-untested extension paths: the ND varargs symbolic call form `itp(u, v)` (vs the tuple form `itp((u, v))`), mixed/second-order ND symbolic derivatives (exercising the DifferentiatedInterpolantND order-accumulation path), and the `nameof` registrations. Raises Symbolics-extension line coverage from ~51% to ~60%; the residual lines are constant-folded `nameof` one-liners and defensive `promote_symtype`/`promote_shape` overloads not invoked by the Symbolics 7 term machinery, which coverage tooling cannot register. Co-authored-by: Cursor <cursoragent@cursor.com>
…ontract tests test_symbolics.jl now mirrors the extension's isdefined(SymbolicUtils, :TypeT) guard: under Symbolics 7 / SymbolicUtils 4 the existing registration tests run unchanged (whitespace-only diff on the 194-line body), while under Symbolics 6 / SymbolicUtils 3 a new testset pins the no-op contract instead of erroring: the extension loads as an empty module, the numeric core is unaffected with Symbolics loaded, symbolic calls throw (TypeError) rather than returning silent wrong results, and nameof stays unregistered. Verified locally on both generations: Symbolics 7.24.0 / SymbolicUtils 4.29.3 (28 passes) and Symbolics 6.58.0 / SymbolicUtils 3.32.0 (25 passes). Runic clean.
mgyoo86
referenced
this pull request
Jun 10, 2026
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.
The FastInterpolationsSymbolicsExt weak compat pinned Symbolics = "7", which forces the entire environment to Symbolics 7 whenever Symbolics is present (weak compat is enforced even when the extension is unused). This made FastInterpolations 0.4.x unresolvable in ecosystems still on the Symbolics 6 / SymbolicUtils 3 / ModelingToolkit 9 generation (e.g. FUSE via ThermalSystemModels), breaking downstream builds.
Guard the extension body behind
isdefined(SymbolicUtils, :TypeT)(the SymbolicUtils 4 API the extension relies on) so it compiles out as a no-op on the older generation, and widen the weak compat to Symbolics = "6, 7". Symbolics 7 keeps full symbolic-interpolation functionality; Symbolics 6 environments can install FastInterpolations with the extension simply inactive. Numeric interpolation is unaffected on either generation.Verified: precompiles as a no-op under Symbolics 6.58 / SymbolicUtils 3.32 and precompiles + functions under Symbolics 7.26 / SymbolicUtils 4.