Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Text::Markdown::Hoedown callback renderer lacks upstream setter methods

オープン
#1,522 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
76/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
java, perl

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

area:backend area:cpan-port bug

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->new
  • Text::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.

主要言語
Perl
スター
64
フォーク
6
平均マージ
4時間 53分
マージ済み PR(30日)
165

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

fglock/PerlOnJava のほかの issue

fglock/PerlOnJava の issue をすべて見る

似ている issue

Perl の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。