Conflict-marker diagnostic falsely rejects heredoc content
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
コミット 2d3c36bb235 で導入された競合マーカーの診断から始め、最小限の heredoc ケースを再現してから、CONFLICT_MARKER 周辺のパーサー処理を調べます。Text::FormatTable v1.03 の再現にある test.pl と、既存の競合マーカー診断テストをチェックとして使用します。heredoc と引用符で囲まれたマーカーテキストがコンパイルでき、一方で実際のソースマーカーは JVM バックエンドとインタープリターバックエンドの両方で引き続き診断を生成すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Summary
PerlOnJava incorrectly reports a version-control conflict marker when a Perl heredoc contains a legitimate run of = characters. This is a parser regression that breaks Text::FormatTable v1.03.
CPAN evidence
- CPAN run:
20260918-141920-96054 - Distribution:
Text::FormatTablev1.03 - System Perl: PASS — 5 tests
- PerlOnJava: FAIL during compilation
- Both JVM and interpreter backends reproduce the failure
The upstream test contains a heredoc with expected table output. One line consists of a run of equals signs:
my $shouldbe = <<'END';
a| b c
=================
...
END
PerlOnJava aborts before the test can run:
Version control conflict marker at test.pl line 21, near "============="
The same test passes under standard Perl.
Root cause
The conflict-marker diagnostic added by commit 2d3c36bb2355 treats the equals-sign content inside the heredoc as a CONFLICT_MARKER token. The diagnostic is intended for actual source-level merge markers such as a standalone ======= line, but it is being applied to literal heredoc content where the text must remain part of the string.
The failure is therefore independent of Text::FormatTable behavior; the module's test data happens to contain the triggering text.
Reproduction
Run the Text::FormatTable v1.03 test suite with PerlOnJava. The test.pl program fails at the heredoc line containing the table rule. A minimal equivalent reproducer is:
my $text = <<'END';
=======
END
This must compile as a string literal and must not raise a conflict-marker diagnostic. The archived CPAN run reproduces the failure on both execution backends.
Expected behavior
Conflict-marker diagnostics should not inspect or tokenize the contents of quoted strings, including heredocs. Literal sequences of seven or more <, =, or > characters inside a string must remain string data.
Actual source-level conflict markers should continue to receive the intended diagnostic when they occur in a context where Perl treats them as source rather than string content.
Requested fix
- Restrict conflict-marker detection to valid source-level marker positions outside quoted strings and heredocs.
- Preserve the existing diagnostics for genuine conflict markers.
- Add a focused parser regression test covering equals-sign runs in heredocs and quoted strings.
- Rerun
Text::FormatTablev1.03 and the existing conflict-marker diagnostic tests on both JVM and interpreter backends.
- 主要言語
- Perl
- スター
- 64
- フォーク
- 7
- 平均マージ
- 4時間 29分
- マージ済み PR(30日)
- 176
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
fglock/PerlOnJava のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
fglock/PerlOnJava#1579 ·
メンテナーはふだん 1 日以内に返信
-
area:cpan-port area:unicode bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
fglock/PerlOnJava#1341 ·
メンテナーはふだん 1 日以内に返信
-
area:platform area:runtime bug
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
fglock/PerlOnJava#1635 ·
メンテナーはふだん 1 日以内に返信
-
area:cpan-port area:runtime bug
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
fglock/PerlOnJava#1634 ·
メンテナーはふだん 1 日以内に返信
-
area:cpan-port bug
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
fglock/PerlOnJava#1633 ·
メンテナーはふだん 1 日以内に返信
fglock/PerlOnJava の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
inverse-inc/packetfence#9387 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
linux-test-project/lcov#552 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
szTheory/exifcleaner#383 ·
メンテナーはふだん 1 日以内に返信
-
1.severity: security
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
NixOS/nixpkgs#569828 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 3 日以内に返信