Tests fail on Julia 1.13: keyword-only anonymous function in test/problems/goddard.jl

オープン
#996 コメント 0 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@ocots がすでに取り組んでいます。

2026年10月19日 から。

評価

この issue はまだ評価されていません。

説明

The tests fail on Julia 1.13 with a syntax error in test/problems/goddard.jl, line 82:

return function (; hamiltonian_type::Symbol=:total)
LoadError: syntax: invalid assignment location "hamiltonian_type::Symbol = :total" around test/problems/goddard.jl:82

An anonymous function whose arguments are keywords only is rejected by the 1.13 parser. The error hits every test file that includes the Goddard problem: suite/builders/test_options_forwarding.jl, suite/indirect/test_shooting_sweep.jl, suite/problems/test_forms_equivalent.jl, suite/problems/test_hamiltonian_type.jl.

Seen in the CI of main (the 1.13 jobs fail, 1.10 passes) and in the breakage suite of CTBase, on main and on v2.2.1-beta: https://github.com/control-toolbox/CTBase.jl/actions/runs/39232998112. Since version: 1 now resolves to 1.13, every job on 1 fails too.

Fix: give the closure a name, which the parser accepts on every version, e.g.

shoot(; hamiltonian_type::Symbol=:total) = begin ... end
return shoot

or the arrow form (; hamiltonian_type::Symbol=:total) -> .... Worth a search for the same pattern elsewhere in test/ and src/.

🤖 Generated with Claude Code

主要言語
Julia
スター
135
フォーク
11
平均マージ
7時間 51分
マージ済み PR(30日)
22

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

control-toolbox/OptimalControl.jl のほかの issue

control-toolbox/OptimalControl.jl の issue をすべて見る

似ている issue

Julia の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。