Remove the re-exports of CTModels and ExaModels once @def is hygienic
メンテナーはふだん 1 日以内に返信
@ocots がすでに取り組んでいます。
2026年10月9日 から。
評価
この issue はまだ評価されていません。
説明
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.
- 主要言語
- Julia
- スター
- 135
- フォーク
- 11
- 平均マージ
- 7時間 49分
- マージ済み PR(30日)
- 23
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
control-toolbox/OptimalControl.jl のほかの issue
-
[Doc] A pull request without the preview label announces a deployment that never happens対応中かも @ocots が 3 日前に担当しました。 オープンdocumentation
control-toolbox/OptimalControl.jl#1042 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
[Doc] User guide to the duals: every kind, constraint ↔ dual, direct ↔ indirect対応中かも @ocots が 10 日前に担当しました。 オープン
control-toolbox/OptimalControl.jl#1035 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Tests of the duals: every kind of constraint, direct vs indirect, pinned algorithms対応中かも @ocots が 10 日前に担当しました。 オープン
control-toolbox/OptimalControl.jl#1034 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
[Doc] Examples for the sign convention of duals and costate (min/max, writing of constraints, direct vs indirect)対応中かも @ocots が 18 日前に担当しました。 オープン
control-toolbox/OptimalControl.jl#1016 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Documentation: sign conventions (min/max, p⁰, constraints, duals) and how they appear in a solution対応中かも @ocots が 20 日前に担当しました。 オープンdocumentation
control-toolbox/OptimalControl.jl#1015 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
control-toolbox/OptimalControl.jl の issue をすべて見る
似ている issue
-
documentation priority: high
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
TuringLang/Turing.jl#2917 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 2 日以内に返信
-
30-minutes algorithm any-language codewars dart easy elixir hackerrank hacktoberfest haskell help wanted interview-prep julia leetcode lua open-source r scala students zig
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
Huerte/algo-solutions-python#226 ·
メンテナーはふだん 1 日以内に返信