Skip to content

Import Symbolics.@wrapped so MethodOfLines precompiles - #667

Closed
utkuyilmaz1903 wants to merge 3 commits into
SciML:masterfrom
utkuyilmaz1903:hotfix/fix-symbolics-wrapped-import
Closed

utkuyilmaz1903 wants to merge 3 commits into
SciML:masterfrom
utkuyilmaz1903:hotfix/fix-symbolics-wrapped-import

Conversation

@utkuyilmaz1903

Copy link
Copy Markdown
Member

#655 calls Symbolics.@register_array_symbolic for the array integral helpers. That macro escapes @wrapped into this module, and we only import a handful of Symbolics names, so using MethodOfLines dies with UndefVarError: @wrapped not defined.

Docs, downgrade, and the benchmark job all hit it. Benchmarks fail on MethodOfLines@master before they even look at a feature branch.

This just adds @wrapped to the existing using Symbolics: list.

@utkuyilmaz1903

Copy link
Copy Markdown
Member Author

The benchmark job fails while precompiling the master baseline, before it reaches this PR. Since this PR fixes that exact master precompile failure, the benchmark cannot pass until the fix is merged.

@utkuyilmaz1903
utkuyilmaz1903 marked this pull request as draft August 26, 2026 21:20
@utkuyilmaz1903

Copy link
Copy Markdown
Member Author

@ChrisRackauckas Looks like SymbolicUtils 4.46.0 is the trigger. After updating the registry, a fresh environment with this branch resolves Symbolics 7.36.0 + SymbolicUtils 4.46.0 and reproduces the same ImmutableDict failure. It matches JuliaSymbolics/Symbolics.jl#1960, which is already on master. Could we release 7.37.0?

@utkuyilmaz1903
utkuyilmaz1903 marked this pull request as ready for review August 27, 2026 14:25
Comment thread src/MethodOfLines.jl
using SymbolicUtils: @rule, hasmetadata, setmetadata, substitute, term
import Symbolics
using Symbolics: @variables, Differential, Equation, Integral, Num, terms
using Symbolics: @variables, @wrapped, Differential, Equation, Integral, Num, terms

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what uses this? We should probably just make it public API upstream instead of specializing it here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's from the @register_array_symbolic calls in #655 that macro expands to a bare @wrapped in the calling module. it's already exported actually, @register_symbolic qualifies it but the array version doesn't. should just be qualified upstream, but until then we need the import here.

@ChrisRackauckas

Copy link
Copy Markdown
Member

Fixed upstream.

@utkuyilmaz1903

Copy link
Copy Markdown
Member Author

thanks. then we'll wait for the Symbolics release, and then I'll retest the other array discretization PRs against clean CI.

@utkuyilmaz1903
utkuyilmaz1903 deleted the hotfix/fix-symbolics-wrapped-import branch August 27, 2026 20:00
@ChrisRackauckas

Copy link
Copy Markdown
Member

It should already be released.

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.

2 participants