Port Syntax::Keyword::Try using the parser keyword extension
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 12/100
Línea de trabajo
This is parser-keyword provider work built on the merged parser extension API from #1292 and PR #1883, so start with the keyword-plugin code those reference rather than the CPAN module. Read how the Function::Parameters provider registers keywords and lowers to the shared AST, then plan the try/catch/finally nodes. Done means the focused tests for normal, thrown, finally, return and lexical-scope cases pass on both JVM and interpreter backends.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
Add a PerlOnJava provider for Syntax::Keyword::Try using the parser keyword extension and shared AST. The CPAN distribution implements try/catch/finally as parser syntax; its XS implementation cannot load in PerlOnJava, but a parser-backed provider can support the language behavior without porting the Perl 5 XS ABI.
Motivation and evidence
The archived CPAN run 20261112-134536-63590 tested Data::Structure::Deserialize::Auto 1.01. Its nine failing test programs all aborted while loading Syntax::Keyword::Try with no Java XS implementation available, before reaching deserialization assertions. The target imports Syntax::Keyword::Try unconditionally.
I installed the target and its prerequisites into an isolated temporary library and ran its unmodified suite with system Perl 5.34.1. All 10 test programs and 11 tests passed. Syntax::Keyword::Try 0.31 and its XS parser dependency compiled under system Perl; its own test suite passed. This confirms the PerlOnJava failure is the missing parser-syntax provider, not a failure in the target module's behavior.
MetaCPAN's reverse-dependency endpoint reported 67 raw candidate records. Of the 50 records returned on its first page, 49 unique released distributions declare Syntax::Keyword::Try as a required runtime dependency; all 49 were released in the five-year window beginning 2021-11-13. Examples include Data-Structure-Deserialize-Auto, Workflow, Mojo-Darkpan, MCP-Wiki, Feature-Compat-Try, and Zydeco. The endpoint returned an empty second page, so 49 is a verified lower bound for both unique runtime dependants and recent dependants, not a complete count.
Existing parser work
- #1292 introduced the parser keyword-plugin API.
- PR #1883 merged that API and the
Function::Parametersprovider on 2026-10-26. - #1361 tracks the
Function::Parametersconsumer and its remaining compatibility gaps.
This issue tracks a separate provider that uses the now-merged parser extension capability.
Suggested scope
Implement a documented useful subset of Syntax::Keyword::Try using the shared AST consumed by both backends. Start with try and catch, then add finally with Perl-compatible cleanup and exception propagation. Preserve behavior for return and loop-control statements where supported by the parser/runtime. Keep imports and keyword activation scoped to the compiling lexical context. Explicitly document and diagnose unsupported module options or experimental syntax.
Do not use a source filter or attempt to load the CPAN XS object. Reuse the parser-plugin lifecycle from #1292 and add project-owned tests validated against system Perl first.
Acceptance criteria
- A bundled provider loads
Syntax::Keyword::Tryon JVM and interpreter backends without XS loading. - Focused tests cover normal completion, thrown and caught exceptions, optional catch variables, finally execution, exception propagation, return behavior, and lexical activation/removal.
- The upstream
Syntax::Keyword::Trytests that match the supported subset pass, andData::Structure::Deserialize::Auto1.01 progresses past module loading on both backends. - Unsupported syntax fails with a source-located diagnostic; it is not silently treated as ordinary Perl code.
- Lenguaje dominante
- Perl
- Estrellas
- 67
- Forks
- 8
- Merge medio
- 5 h 12 min
- PR fusionados (30 d)
- 131
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de fglock/PerlOnJava
-
area:cpan-port bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
fglock/PerlOnJava#2153 ·
Los mantenedores suelen responder en 1 día
-
area:cpan-port area:parser bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
fglock/PerlOnJava#2137 ·
Los mantenedores suelen responder en 1 día
-
area:backend area:cpan-port area:runtime bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
fglock/PerlOnJava#2071 ·
Los mantenedores suelen responder en 1 día
-
area:runtime documentation enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
fglock/PerlOnJava#1579 ·
Los mantenedores suelen responder en 1 día
-
area:cpan-port bug
Dificultad 3/5 1-2 días Aptitud para principiantes 62/100
fglock/PerlOnJava#2157 ·
Los mantenedores suelen responder en 1 día
Todos los issues de fglock/PerlOnJava
Issues similares
-
Dev-output directory preparation accepts file-valued lib/include paths and fails on dangling linksAbiertoteam-cli
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 93/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
inverse-inc/packetfence#9728 ·
Los mantenedores suelen responder en 1 día
-
fix(char-create): show the real reason a character is refusedPosiblemente ocupada @baphomello la tomó hace 1 día. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día