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

Đang mở
#996 0 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@ocots đang làm issue này rồi.

Từ ngày 19/10/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

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

Ngôn ngữ chính
Julia
Star
135
Fork
11
Merge trung bình
7 giờ 51 phút
Pull request đã merge (30 ngày)
22

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của control-toolbox/OptimalControl.jl

Tất cả issue của control-toolbox/OptimalControl.jl

Issue tương tự

Thêm issue về Julia

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.