Fix @register_symbolic when Symbolics is not in caller namespace#1810
Open
asinghvi17 wants to merge 1 commit into
Open
Fix @register_symbolic when Symbolics is not in caller namespace#1810asinghvi17 wants to merge 1 commit into
asinghvi17 wants to merge 1 commit into
Conversation
…ated code `@register_symbolic` and `register_array_symbolic` emitted `Symbolics.@wrapped` / `@wrapped` as literal references in `esc()`'d output, requiring `Symbolics` to be in the caller's namespace. This broke when users did `using Symbolics: @register_symbolic` without importing the full module. Fix by interpolating `$(Symbolics)` so the module object is captured at macro-expansion time. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1810 +/- ##
==========================================
- Coverage 26.15% 26.13% -0.03%
==========================================
Files 56 56
Lines 5329 5350 +21
==========================================
+ Hits 1394 1398 +4
- Misses 3935 3952 +17 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Author
|
I have 0 clue why tests are failing here, maybe @ChrisRackauckas-Claude has some idea? |
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
Symbolicsmodule reference in@register_symbolicandregister_array_symbolicmacro-generated code so callers don't needSymbolicsin their namespaceusing Symbolics: @register_symbolicfollowed by@register_symbolic f(...)would error withUndefVarError: Symbolics not definedTest plan
using Symbolics: @register_symbolicworks in an isolated module🤖 Generated with Claude Code