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

Aperta
#996 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@ocots ci sta già lavorando.

Dal 19/10/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

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

Lingua principale
Julia
Stelle
135
Fork
11
Merge medio
7h 51m
PR unite (30g)
22

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di control-toolbox/OptimalControl.jl

Tutte le issue di control-toolbox/OptimalControl.jl

Issue simili

Altre issue su Julia

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.