Source comments still say STRICT_REQUIRE raises "under strict" only; since #2502 it raises in every EIGS_STRICT state

Đang mở Phù hợp với người mới
#2,601 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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

Chưa có ai nhận issue này.

Đánh giá

Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
88/100
Loại issue
Tài liệu
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
c
Lĩnh vực
documentation

Hướng nghiên cứu

Đọc bốn chú thích tại src/builtins.c:1652, src/builtins.c:1729, src/builtins.c:1798 và src/ext_gfx.c:1289, cùng với định nghĩa STRICT_REQUIRE tại src/eigenscript.h:1562-1568 và hành vi trong #2502. Cập nhật các chú thích để mô tả rằng type_mismatch được phát sinh trong mọi trạng thái EIGS_STRICT, sau đó chạy grep -nE 'raises? under strict' src/*.c src/*.h và xác nhận không có chú thích nào về STRICT_REQUIRE hoặc ARG_GUARD mô tả hành vi chỉ xảy ra ở chế độ strict.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

area:stdlib kind:docs-drift

Found while verifying #2409 during a stale-issue sweep against main at 98d15c5.

Since #2502 (fixed by #2510, 92b000fc), wrong-typed arguments raise type_mismatch in every EIGS_STRICT state. STRICT_REQUIRE (src/eigenscript.h:1562-1568) now calls rt_error(EK_TYPE, ...) unconditionally. Four comments above its uses still describe the old split behaviour:

  • src/builtins.c:1652: "so STRICT_REQUIRE: raise under strict, byte-identical otherwise."
  • src/builtins.c:1729: "Coercion shape: raise under strict, unchanged otherwise."
  • src/builtins.c:1798: "Coercion shape: raise under strict, unchanged otherwise."
  • src/ext_gfx.c:1289: "so this raises under strict and does nothing otherwise."

(Line numbers at 98d15c5.) src/builtins.c:1139 also says "raise under strict decode", but it describes json_decode's own strict-decode flag, not this guard. It is out of scope here.

The macro's name says "strict" too, although it no longer depends on strictness. Renaming it is optional and can be decided in the PR.

Done when

  • The four comments above describe the guard as raising type_mismatch in every EIGS_STRICT state (#2502), or the guard's behaviour is changed to match them, with a decision recorded.
  • grep -nE 'raises? under strict' src/*.c src/*.h lists no comment that describes STRICT_REQUIRE or ARG_GUARD as strict-only. The json_decode strict-decode comment at src/builtins.c:1139 may remain.
Ngôn ngữ chính
C
Star
3
Fork
7
Merge trung bình
4 giờ 33 phút
Pull request đã merge (30 ngày)
156

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

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

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 InauguralSystems/EigenScript

Tất cả issue của InauguralSystems/EigenScript

Issue tương tự

Thêm issue về C

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.