Remove the re-exports of CTModels and ExaModels once @def is hygienic
I maintainer di solito rispondono entro 1 giorno
@ocots ci sta già lavorando.
Dal 9/10/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Summary
Once the generated code of @def contains the modules instead of their names (https://github.com/control-toolbox/CTParser.jl/issues/356), OptimalControl no longer needs to re-export the module names CTModels and ExaModels. Remove these re-exports, so that using OptimalControl does not bring implementation packages into the namespace of the user. The same for CTLie: see #966, which concerns @Lie (control-toolbox/CTLie.jl#40).
Why they are re-exported today
Each of these lines is commented # for generated code (prefix):
| File | Line | Used by |
|---|---|---|
src/imports/ctmodels.jl |
@reexport import CTModels: CTModels |
@def, backend :fun |
src/imports/examodels.jl |
@reexport import ExaModels: ExaModels |
@def, backend :exa |
src/imports/ctbase.jl |
@reexport import CTBase: CTBase |
@def (errors), @Lie (CTBase.Traits) |
src/imports/ctlie.jl |
@reexport import CTLie: CTLie |
@Lie (see #966) |
src/imports/ctflows.jl |
@reexport import CTFlows: CTFlows |
to check: no generated code is known to name CTFlows |
Today, import OptimalControl followed by OptimalControl.@def … fails with UndefVarError: CTModels not defined, because the generated code names the module in the caller's module.
To do, after the CTParser issue is released
- Bump the compat of CTParser (and of CTLie, for #966).
- Remove the re-exports of the table that are no longer needed, and the comments that justify them. Keep a re-export only if it is useful by itself:
CTBaseis used by users forCTBase.Differentiationand the exceptions in the documentation; decide whether it stays exported. - Update
test/suite/reexport/, which checks the exported names, and add a test of@defafterimport OptimalControlonly, and afterusing OptimalControl: @def. - Update the documentation: the page "The
@Liemacro" (section "using OptimalControlis needed"), and check the pages that useCTBase.…,CTModels.…orExaModels.…afterusing OptimalControl. - Mention the removed names in
BREAKING.mdand the changelog of the release.
- Lingua principale
- Julia
- Stelle
- 135
- Fork
- 11
- Merge medio
- 7h 49m
- PR unite (30g)
- 23
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di control-toolbox/OptimalControl.jl
-
[Doc] A pull request without the preview label announces a deployment that never happensForse già presa @ocots l’ha presa 2 giorni fa. Apertadocumentation
control-toolbox/OptimalControl.jl#1042 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
[Doc] User guide to the duals: every kind, constraint ↔ dual, direct ↔ indirectForse già presa @ocots l’ha presa 9 giorni fa. Aperta
control-toolbox/OptimalControl.jl#1035 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Tests of the duals: every kind of constraint, direct vs indirect, pinned algorithmsForse già presa @ocots l’ha presa 9 giorni fa. Aperta
control-toolbox/OptimalControl.jl#1034 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
[Doc] Examples for the sign convention of duals and costate (min/max, writing of constraints, direct vs indirect)Forse già presa @ocots l’ha presa 17 giorni fa. Aperta
control-toolbox/OptimalControl.jl#1016 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Documentation: sign conventions (min/max, p⁰, constraints, duals) and how they appear in a solutionForse già presa @ocots l’ha presa 19 giorni fa. Apertadocumentation
control-toolbox/OptimalControl.jl#1015 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di control-toolbox/OptimalControl.jl
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 62/100
JuliaStats/LogExpFunctions.jl#134 · 2 commenti ·
-
code bug PowerSystems 6.0
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
Sienna-Platform/PowerSystems.jl#1849 ·
I maintainer di solito rispondono entro 7 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 86/100
-
Pin the porting environmentAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
FluxML/Metalhead.jl#407 ·
I maintainer di solito rispondono entro 1 giorno