Text::Markdown::Hoedown callback renderer lacks upstream setter methods
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 76/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- backend, testing-qa
Hướng nghiên cứu
Start with the Java-backed Text::Markdown::Hoedown::Renderer::Callback replacement and the Perl compatibility module's AUTOLOAD path. Run the unchanged upstream t/03_custom.t with jperl and jperl --interpreter; done means callback setters such as doc_header are accepted and the test reaches done_testing() with the expected complete rendered output.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
The PerlOnJava compatibility implementation of Text::Markdown::Hoedown 1.03 does not preserve the upstream callback-renderer API. The upstream custom-renderer test aborts when calling the first callback setter, doc_header.
CPAN reproduction
CPAN random-tester run: 20260925-091055-87943
Distribution: Text-Markdown-Hoedown-1.03
System Perl passes the complete upstream suite:
Files=4, Tests=12
Result: PASS
PerlOnJava reports:
Files=4, Tests=11
Result: FAIL
Failed 1/4 test programs. 0/11 subtests failed.
The test program that fails is the upstream t/03_custom.t callback-renderer test. The other three test programs (t/00_compile.t, t/01_simple.t, and t/02_toc.t) pass.
Reproduction
The failure reproduces on both execution backends:
jperl t/03_custom.t
jperl --interpreter t/03_custom.t
ok 1
# Tests were run but no plan was declared and done_testing() was not seen.
Can't locate object method "doc_header" via package
"Text::Markdown::Hoedown::Renderer::Callback"
The exception occurs at the upstream test's first callback registration:
my $cb = Text::Markdown::Hoedown::Renderer::Callback->new();
$cb->doc_header(sub { ... });
Cause
The original distribution is an XS/native binding, but PerlOnJava has an explicit Java replacement over commonmark-java. The replacement registers:
Text::Markdown::Hoedown::Renderer::Callback->newText::Markdown::Hoedown::Renderer::Callback->DESTROY
It does not preserve the callback setter methods expected by the upstream API. The Perl compatibility module defines an AUTOLOAD setter that stores each callback in the renderer object, but the Java-backed package dispatch currently does not reach that setter for doc_header (and therefore the other callback names).
The Java renderer later looks up callback names such as doc_header, doc_footer, normal_text, entity, header, codespan, paragraph, autolink, linebreak, underline, raw_html, image, link, footnote_ref, and footnote_def. The callback object must accept and retain all of these upstream setter calls.
The missing hoedown/test/MarkdownTest_1.0.3 fixture warnings and the native compiler probe warning during Build.PL are not the test failure: the relevant PerlOnJava Java replacement loads, and the failure is a deterministic method-dispatch/API-compatibility error in t/03_custom.t.
Impact
Reverse-dependency metadata reports 7 unique released runtime dependents and 2 recent dependents for Text::Markdown::Hoedown. Representative distributions include Web-API-Mock, Story-Interact-WWW, Qgoda, MySQL-Admin, Dancer2-Plugin-MarkdownFilesToHTML, and APISchema.
Suggested fix and regression coverage
Preserve the upstream callback setter surface on the Java-backed Renderer::Callback class. A suitable implementation can either make the Perl AUTOLOAD path reachable for unregistered callback methods or explicitly register compatible setter dispatch for the callback names.
Keep the unchanged upstream t/03_custom.t as the regression test and require it to pass on both JVM and interpreter backends. The test should reach done_testing() and retain the expected complete rendered output.
- Ngôn ngữ chính
- Perl
- Star
- 64
- Fork
- 6
- Merge trung bình
- 4 giờ 42 phút
- Pull request đã merge (30 ngày)
- 170
Chuẩn bị môi trường
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 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
area:backend area:cpan-port area:parser area:runtime bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 78/100
fglock/PerlOnJava#1528 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 74/100
fglock/PerlOnJava#1524 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
area:backend area:runtime bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 65/100
fglock/PerlOnJava#1523 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
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 ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của fglock/PerlOnJava
Issue tương tự
-
Strange loop in AgentTicketBulkĐang mởquestion
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
-
Bug Priority
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
canonical/chisel-releases#1235 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ 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