Skip to content

fix(#882): stop recommending using ExaModels, add export-collision canary - #892

Merged
ocots merged 1 commit into
mainfrom
fix/examodels-export-clash
Aug 28, 2026
Merged

ocots merged 1 commit into
mainfrom
fix/examodels-export-clash

Conversation

@ocots

@ocots ocots commented Aug 28, 2026

Copy link
Copy Markdown
Member

Closes #882.

Context

ExaModels 0.12 (pulled in by the #884 compat realignment) newly exports objective and constraint as oracle builders. OptimalControl exports both names as accessors. A user who writes a bare using ExaModels next to using OptimalControl — as two doc pages used to instruct — then gets UndefVarError on the next objective(sol), the ambiguity Julia refuses to resolve.

The using ExaModels is not even needed: src/imports/examodels.jl already does @reexport import ExaModels: ExaModels and ExaModels is a hard [deps] entry, so :exa solves fine from using OptimalControl alone.

What this PR does

The documentation fix already landed in e22fc006 (docs/src/solve/gpu.md, docs/src/getting-started/installation.md no longer import ExaModels, and gpu.md explains the clash). What remained:

  • Regression canary in test/suite/reexport/test_examodels.jl: pins intersect(names(ExaModels), names(OptimalControl)), filtered to genuine binding clashes, to [:constraint, :objective]. The next upstream export that collides now lands as a red test rather than a user bug report (issue's proposed fix fix range #3). :ExaModels (same module object) is excluded automatically.
  • Changelog / breaking / version book-keeping:
    • [2.1.0-beta] dated 2026-07-30 (it is the GitHub release, not "unreleased"); its dependency line is left as what that tag actually shipped.
    • New [2.2.0-beta] — 2026-08-28 entry covering the chore(deps): realign on the released ecosystem #884 dependency realignment (CTBase 0.29 / CTModels 0.18 / CTSolvers 0.5 / CTFlows 0.17 / CTParser 0.9 / CTLie 0.2 / ExaModels 0.12) and the documentation-site rewrite.
    • [2.1.0-beta] / [2.2.0-beta] compare-links added to the footer.
    • BREAKING.md: ## Non-breaking note (2.2.0-beta) — using ExaModels clash, Before / After block, cross-ref to CTParser#230.
    • Project.toml: version = "2.2.0-beta".

Not in scope

  • No change to OptimalControl's own objective / constraint exports — owning them as thin wrappers (the disabled src/imports/redefine.jl) would not fix the clash: Julia still sees two packages exporting the name.
  • docs/make.jl:20 (using ExaModels, feeds names(ExaModels) only) left as-is.
  • No upstream issue at exanauts/ExaModels.jl.

Verification

🤖 Generated with Claude Code

…canary

ExaModels 0.12 newly exports `objective` and `constraint`; OptimalControl
exports both as accessors. A user who writes `using ExaModels` next to
`using OptimalControl` then hits `UndefVarError` on the next `objective(sol)`.
The docs fix already landed in e22fc00 — `:exa` needs no `using ExaModels`
at all. This adds a regression canary so the next colliding upstream export
lands as a red test rather than a user bug report.

Also finalises the changelog: `[2.1.0-beta]` is dated (the GitHub release of
2026-07-30, no longer "unreleased"), and a new `[2.2.0-beta]` entry covers
the #884 dependency realignment (CTBase 0.29 / CTModels 0.18 / CTSolvers 0.5
/ CTFlows 0.17 / CTParser 0.9 / CTLie 0.2 / ExaModels 0.12) and the docs-site
rewrite. `BREAKING.md` gets a non-breaking note for the `using ExaModels`
clash. Project version bumped to 2.2.0-beta.

Full suite: 2243 pass, 2 broken (the deliberate @test_skip GPU sites, #883).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@ocots
ocots merged commit c1e9fb9 into main Aug 28, 2026
3 checks passed
@ocots
ocots deleted the fix/examodels-export-clash branch August 28, 2026 09:21
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.

ExaModels 0.12 exports objective and constraint, clashing with ours — and the docs tell users to import it

1 participant