Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Conflict-marker diagnostic falsely rejects heredoc content

Abierto
#1,434 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
68/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
java, perl
Área
compilers

Línea de trabajo

Comienza con el diagnóstico de marcadores de conflicto introducido por el commit 2d3c36bb235 y reproduce el caso mínimo de heredoc; después inspecciona el manejo del parser alrededor de CONFLICT_MARKER. Usa test.pl de la reproducción de Text::FormatTable v1.03 y las pruebas de diagnóstico existentes para marcadores de conflicto como comprobaciones. Se considera terminado cuando el heredoc y el texto de marcador entre comillas compilan, mientras que los marcadores genuinos del código fuente siguen produciendo diagnósticos en ambos backends, JVM e intérprete.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.
Lenguaje dominante
Perl
Estrellas
64
Forks
7
Merge medio
4 h 29 min
PR fusionados (30 d)
176

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de fglock/PerlOnJava

Todos los issues de fglock/PerlOnJava

Issues similares

Más issues de Perl

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.