Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Conflict-marker diagnostic falsely rejects heredoc content

Aperta
#1,434 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

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
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
java, perl
Ambito
compilers

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

area:cpan-port area:parser bug

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::FormatTable v1.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::FormatTable v1.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

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di fglock/PerlOnJava

Tutte le issue di fglock/PerlOnJava

Issue simili

Altre issue su Perl

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.