Support indirect-object method dispatch used by Set::IntSpan
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 55/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- perl
- Lĩnh vực
- compilers, testing-qa
Hướng nghiên cứu
Bắt đầu bằng cách chạy test tập trung của Set::IntSpan trong t/real_set.t, đặc biệt là các lệnh gọi gián tiếp quanh dòng 22, trên cả hai backend JVM và interpreter. Theo dõi cách parser/compiler xử lý các lệnh gọi này và so sánh với công việc liên quan đến parser trong các issue #1166 và #1314. Được coi là hoàn tất khi cả bốn dạng đều dispatch chính xác, đã bổ sung độ bao phủ hồi quy và toàn bộ test suite gồm 1.947 test đều vượt qua.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
Set::IntSpan 1.19 fails one upstream test under PerlOnJava because valid Perl indirect-object method syntax is resolved as a call to a nonexistent main:: subroutine.
Reproduction
Run the normal Set::IntSpan 1.19 test suite. The focused failure is t/real_set.t, which contains calls such as:
my $set_2 = union $set "1-5,8-9";
my $set_3 = union $set $set_2;
my $set_4 = union $set +[1, 5, 2, 8, 9, 1, 3, 4, 9];
These are valid Perl indirect-object method calls. The union method is implemented by Set::IntSpan and is used through the object in $set.
Expected result
System Perl passes the complete upstream suite:
- 20 test files
- 1,947 tests
t/real_set.tpasses all 4 tests
Actual result
PerlOnJava runs the first real_set.t operation successfully, then fails at the next indirect method call:
1..4
#real_set
#real_set: union set -> -
ok 1
Undefined subroutine &main::union called at t/real_set.t line 22.
The archived CPAN run records:
Failed 1/20 test programs. 0/1944 subtests failed.
The focused t/real_set.t failure reproduces on both the JVM and interpreter backends.
Likely root cause
The parser/compiler recognizes the first form, union $set, sufficiently to execute the empty-set case, but does not consistently preserve the indirect-object method dispatch when additional arguments follow. It emits or resolves union as an ordinary bareword subroutine call in the main package instead of dispatching it as a method on $set.
This is a pure-Perl parser/runtime compatibility issue. Set::IntSpan contains no XS, C, XSLoader, DynaLoader, or FFI dependency, and the failure is independent of services or platform prerequisites.
Acceptance criteria
- All indirect-object method forms used by
Set::IntSpant/real_set.tdispatch to the object method on both backends. Set::IntSpan1.19 passes all 1,947 upstream tests on JVM and interpreter backends.- Add project-owned regression coverage for an indirect method call with no extra argument, a string argument, an object argument, and an array-reference argument.
- Preserve existing parsing behavior for ordinary bareword subroutine calls and malformed syntax.
Evidence
- CPAN run:
20260918-141920-96054 - Distribution:
Set-IntSpan-1.19 - Failing test:
t/real_set.t, line 22 (union $set "1-5,8-9") - System Perl: PASS, 20 files / 1,947 tests
- PerlOnJava: FAIL, 1 file; the run reached 1,944 tests before aborting
- JVM and interpreter: focused failure reproduced
Related issues
- #1166 tracks valid fully-qualified indirect-object constructor forms. It covers a related parser area, but not this unqualified indirect-object method dispatch form.
- #1314 tracks bareword filehandle method dispatch used by
Expect. It is related at the method-dispatch level, but this failure involves a normal Perl object and does not depend on filehandle or IO behavior.
This issue should be coordinated with those parser/runtime fixes, while retaining Set::IntSpan as independent regression coverage.
- Ngôn ngữ chính
- Perl
- Star
- 64
- Fork
- 6
- Merge trung bình
- 5 giờ 33 phút
- Pull request đã merge (30 ngày)
- 170
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của fglock/PerlOnJava
-
area:cpan-port area:unicode bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
fglock/PerlOnJava#1341 ·
-
area:backend area:cpan-port bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 76/100
fglock/PerlOnJava#1522 ·
-
area:backend area:io area:unicode bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
fglock/PerlOnJava#1520 ·
-
area:cpan-port area:memory area:runtime bug
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 28/100
fglock/PerlOnJava#1515 ·
-
area:cpan-port area:io area:runtime bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 58/100
fglock/PerlOnJava#1514 ·
Tất cả issue của fglock/PerlOnJava
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
linuxmuster/sophomorix4#190 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
documentation Needs Triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
trizen/youtube-viewer#456 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100