Fix stale undefined exports (Variable, Unknown)#1906
Merged
ChrisRackauckas merged 1 commit intoJun 22, 2026
Conversation
…Unknown`
`names(Symbolics)` listed two names that do not resolve in the module, so
`Aqua.test_undefined_exports` fails and `@reexport using Symbolics`
leaks an undefined binding into downstream packages:
- `Variable`: `export`ed at src/Symbolics.jl:170, but the `struct Variable{T} end`
(deprecated, redirecting to `variable(name, idx...; T=T)`) was removed in
55a3d1a ("refactor: use `@syms` parsing for `@variables`") without dropping
it from the export list. Removed from the export.
- `Unknown`: marked `@public` in 5d78c7a ("refactor: mark `Unknown` as public"),
but `SymbolicUtils.Unknown` was never brought into the `Symbolics` namespace, so
the public name did not resolve. Imported it alongside the other SymbolicUtils
names so `Symbolics.Unknown === SymbolicUtils.Unknown`.
Verified on Julia 1.12: `Aqua.test_undefined_exports(Symbolics)` fails before
(`[Symbolics.Unknown, Symbolics.Variable]`) and passes after.
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ChrisRackauckas-Claude
pushed a commit
to ChrisRackauckas-Claude/Corleone.jl
that referenced
this pull request
Jun 21, 2026
The manual Symbolics re-export loop works around an undefined `Variable` export (and `@public Unknown`) in Symbolics. Both are fixed upstream in JuliaSymbolics/Symbolics.jl#1906; the comment now records that the loop can be replaced with `@reexport using Symbolics` plus a Symbolics compat-floor bump once that lands. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1906 +/- ##
===========================================
+ Coverage 26.12% 80.75% +54.63%
===========================================
Files 56 59 +3
Lines 5356 5732 +376
===========================================
+ Hits 1399 4629 +3230
+ Misses 3957 1103 -2854 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
7785001
into
JuliaSymbolics:master
18 of 24 checks passed
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.
Problem
names(Symbolics)currently lists two names that do not resolve in the module, soAqua.test_undefined_exports(Symbolics)fails and a blanket@reexport using Symbolicsleaks an undefined binding into downstream packages (this is what forced the workaround in SciML/Corleone.jl#86).On Julia 1.12 with Symbolics v7.28.1 / current master:
Root cause
Variableisexported atsrc/Symbolics.jl:170, but thestruct Variable{T} end(a deprecated shim that redirected tovariable(name, idx...; T=T)) was removed in 55a3d1a ("refactor: use@symsparsing for@variables") without dropping it from the export list. The binding has not existed since.Unknownwas marked@publicin 5d78c7a ("refactor: markUnknownas public"), butSymbolicUtils.Unknownwas never brought into theSymbolicsnamespace, so the public name had nothing to resolve to.SymbolicUtilsdoes not exportUnknown, so@reexport using SymbolicUtilsdoes not bring it in either.Fix
Variablefrom theexport(the public replacement isvariable(...)).Unknownalongside the otherSymbolicUtilsnames so the@public Unknownresolves (Symbolics.Unknown === SymbolicUtils.Unknown). This matches howUnknownis already referenced throughout the source asSymbolicUtils.Unknown.Verification (Julia 1.12)
Aqua.test_undefined_exports(Symbolics)fails ([Symbolics.Unknown, Symbolics.Variable]).Aqua.test_undefined_exports(Symbolics)passes;filter(n -> !isdefined(Symbolics, n), names(Symbolics))is empty;Symbolics.Unknown === SymbolicUtils.Unknown; core smoke test (@variables,derivative,variable(:z),Unknown(2)) still works.Runic: the two changed lines are Runic-clean (sciml style). The file has unrelated pre-existing Runic drift in a precompile block near the bottom, which is left untouched to keep the diff minimal.
Please ignore until reviewed by @ChrisRackauckas.
🤖 Generated with Claude Code