O-4a: O-3 doesn't follow a closure stored through an action argument, and a registration widget to price the fix

Đang mở
#37 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ó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
28/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
compilers

Hướng nghiên cứu

Start with O-3 and O-3b in spec/03-regions.md, then read MO-3 and S-region-7 to trace how action arguments and retained closures are represented. Review the proposed widget port and scenario in examples/lib/, comparing REGION_ESCAPE results before and after the O-3 change. Done means the retained closure gap is closed and the scenarios record correctness, restructuring, and capability movement.

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

Mô tả

Follow-up to #15. That issue's two soundness holes were fixed in #16 (O-3a/O-3b in spec/03-regions.md). Its main over-rejection example was registering through a source context (use fields := …). That shape went away when RG-7c was withdrawn on 2026-10-31: registration now goes through actions in the context's value (provide fields = { add, remove }, S-region-7).

That leaves the opposite problem, recorded in the spec as O-4a (known gap):

O-3 does not yet follow a closure handed to an action as an argument and stored by it (register(() => v) where register stores its parameter in an outer source). The same gap exists for an on* handler prop that stores its argument.

So a row-local closure registered through a provided add is accepted today, even when no cleanup removes it.

To do

  1. Close the gap. Have O-3 follow an action's parameter into a store, the way O-3b follows a prop: the closure passed for that argument must not capture a name that ends before the place the action stores it. Across modules this belongs in the signature (MO-3 retains(...)).
  2. Price it with the widget port #15 proposed. Port one headless widget built on child→parent registration (a listbox/combobox in the shape of Kobalte's, or field registration in the shape of TanStack Form) into examples/lib/ with its scenario. For each REGION_ESCAPE, record whether the program was correct, the restructuring, and whether the restructuring moved a capability out of the region it belongs to. Do this both before and after step 1.

The #15 point still stands for 08: say what O-3 is sound over (closures capturing reactive names, stored through .rx writes and actions) and what it leaves to the runtime (JS sinks, values that retain resources, CN-3b).

Ngôn ngữ chính
TypeScript
Star
127
Fork
7
Merge trung bình
15 giờ 42 phút
Pull request đã merge (30 ngày)
63

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 solidjs/reactivescript

Tất cả issue của solidjs/reactivescript

Issue tương tự

Thêm issue về TypeScript

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.