Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Stale comments after the dict and JSX representation changes

Đang mở
#8,767 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ó
3/5
Thời gian dự kiến
Nửa ngày
Mức phù hợp với người mới
55/100
Loại issue
Tài liệu
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
javascript, ocaml
Lĩnh vực
compilers

Hướng nghiên cứu

Start with the three comments named in the issue: compiler/ml/translcore.ml around line 1453, analysis/reanalyze/src/side_effects.ml around line 63, and compiler/ml/lambda.ml lines 292-294. Check them against compiler/core/lam_compile_primitive.ml, which now compiles Pdict_spread to an object literal. Done when the dict and side-effect comments describe the current output, and the lambda.ml comment is either corrected or backed by the constructor-ordering practice. That last part needs a maintainer decision, so ask before changing it.

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

Mô tả

Found by differential semantic drift analysis from ece8b148 to a7721303.

What is broken

Comments still describe representations that the dict and JSX changes replaced:

  • translcore.ml L1453 says dict spreads compile to Object.assign via Primitive_dict.spread. Since #8747 Pdict_spread compiles to an object literal with spreads (lam_compile_primitive.ml).
  • analysis/reanalyze/src/side_effects.ml L63 says "Object.assign reads the spread dicts". The logic (a spread may have side effects) still holds; the wording does not.
  • compiler/ml/lambda.ml L292-L294 says .cmj files marshal Lambda.t without a version check, so constructors must not be inserted where they shift existing tags. #8754 then inserted Pjsx among the non-constant constructors and changed Pjs_call. Rebuilds after a compiler change probably make this harmless, but the comment and the practice disagree: either the comment overstates the constraint, or the constraint was broken.

Possible cause (speculation only)

A guess: each PR updated the code paths it changed and their tests, while comments elsewhere that describe the same mechanism were not searched for.

Ngôn ngữ chính
OCaml
Star
7.5k
Fork
484
Merge trung bình
22 giờ 10 phút
Pull request đã merge (30 ngày)
70

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 rescript-lang/rescript

Tất cả issue của rescript-lang/rescript

Issue tương tự

Thêm issue về Compilers

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.