Conflict-marker diagnostic falsely rejects heredoc content
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 68/100
Direzione di ricerca
Inizia dalla diagnostica dei marcatori di conflitto introdotta dal commit 2d3c36bb235 e riproduci il caso minimo con heredoc, quindi esamina la gestione del parser intorno a CONFLICT_MARKER. Usa test.pl dalla riproduzione di Text::FormatTable v1.03 e i test diagnostici esistenti per i marcatori di conflitto come verifiche. Il lavoro è completato quando l'heredoc e il testo del marcatore tra virgolette vengono compilati, mentre i marcatori effettivi nel codice sorgente continuano a produrre diagnostica su entrambi i backend, JVM e interprete.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Perl
- Stelle
- 64
- Fork
- 6
- Merge medio
- 4h 34m
- PR unite (30g)
- 181
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di fglock/PerlOnJava
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
fglock/PerlOnJava#1579 ·
I maintainer di solito rispondono entro 1 giorno
-
area:cpan-port area:unicode bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
fglock/PerlOnJava#1341 ·
I maintainer di solito rispondono entro 1 giorno
-
area:io area:runtime bug
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
fglock/PerlOnJava#1630 ·
I maintainer di solito rispondono entro 1 giorno
-
area:cpan-port area:unicode bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
fglock/PerlOnJava#1629 ·
I maintainer di solito rispondono entro 1 giorno
-
area:cpan-port bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
fglock/PerlOnJava#1626 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di fglock/PerlOnJava
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
ESCOMP/CAM#1701 · 1 commento ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 86/100
-
Multiple IPs in hostnameApertabug OS Images
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
stfc/cloud-image-builders#233 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
language/en needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
kubernetes/website#57846 · 2 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno