JVM regex loses package context for deferred user-defined Unicode properties
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 46/100
Piste de recherche
Start by tracing RuntimeRegex and UnicodeResolver.activeUserPropertyPackage(), then compare runtime/dynamic regex construction and interpolated regex handling with the interpreter path. Read the existing user_property_package_provenance.t coverage and add a focused regression for Text::ANSI::Fold's deferred IsEOL resolution. Done means the regression passes on system Perl and both PerlOnJava backends, while explicitly qualified properties keep their behavior; confirm the upstream suite passes on the JVM and interpreter.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Summary
The JVM backend fails to resolve Text-ANSI-Fold's user-defined Unicode property IsEOL in its defining package. The property is defined as Text::ANSI::Fold::IsEOL, but regex execution reports an attempt to resolve main::IsEOL. The same distribution passes under system Perl and PerlOnJava's interpreter backend.
Reproducer
With Text-ANSI-Fold 2.3902 and its declared dependencies installed:
use Text::ANSI::Fold;
print Text::ANSI::Fold->fold("word", width => 10), "\n";
System Perl prints the folded text. On the PerlOnJava JVM backend, the call aborts with:
Unknown user-defined property name \p{main::IsEOL} at Text/ANSI/Fold.pm line 504.
The reported source line is in the folding path; IsEOL is defined in package Text::ANSI::Fold earlier in the module and returns the newline code-point ranges.
Evidence
- Distribution: Text-ANSI-Fold 2.3902; CPAN run
20261119-133823-51077. - The archived JVM run passed
t/00_compile.t, then failed across the suite withUnknown user-defined property name \\p{main::IsEOL}.t/17_progress.talso showed dependent assertion failures after property resolution failed. - System Perl 5.34.1 passed the complete upstream suite: 18 files, 576 tests.
- PerlOnJava interpreter passed
t/01_fold.t(48 tests). The JVM backend failed the same focused test with the diagnostic above. - PerlOnJava source revision used by the archived run:
f00b834bab10d59c1dcf802784e05dd4c9726c22(Perl 5.44.1); OpenJDK 24.0.2 on macOS arm64.
Root-cause direction
The diagnostic shows that the JVM path qualifies the property in main, although the property definition and the regex use belong to Text::ANSI::Fold. RuntimeRegex captures UnicodeResolver.activeUserPropertyPackage() in the compiled regex, and deferred Joni property resolution reinstates that captured package. The run therefore points to a package-provenance loss earlier in the JVM runtime-regex path: by the time the affected regex is compiled or its property context is captured, the package is already main. Trace runtime/dynamic regex construction and interpolated regex handling for this module against the interpreter path, and ensure deferred property resolution uses the regex's defining package.
Existing user_property_package_provenance.t coverage exercises package-local properties and embedding a compiled qr; it does not currently catch this CPAN runtime path.
Acceptance criteria
- Add a focused project-owned regression that passes on system Perl, fails on the unfixed JVM backend with the package-context error, and passes on both PerlOnJava backends after the fix.
- Preserve package context for
IsEOLduring the Text::ANSI::Fold call above, without changing how explicitly qualified properties resolve. - Re-run Text-ANSI-Fold 2.3902 on JVM and interpreter and confirm the upstream suite passes.
- Langage dominant
- Perl
- Étoiles
- 67
- Forks
- 8
- Merge moyen
- 5 h 12 min
- PR mergées (30 j)
- 131
Préparer son environnement
- Fournit un Dockerfile ou un fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de fglock/PerlOnJava
-
area:cpan-port bug
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
fglock/PerlOnJava#2153 ·
Les mainteneurs répondent en général sous 1 jour
-
area:cpan-port area:parser bug
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
fglock/PerlOnJava#2137 ·
Les mainteneurs répondent en général sous 1 jour
-
area:backend area:cpan-port area:runtime bug
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
fglock/PerlOnJava#2071 ·
Les mainteneurs répondent en général sous 1 jour
-
area:runtime documentation enhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
fglock/PerlOnJava#1579 ·
Les mainteneurs répondent en général sous 1 jour
-
area:cpan-port bug
Difficulté 3/5 1-2 jours Accessibilité débutants 62/100
fglock/PerlOnJava#2157 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de fglock/PerlOnJava
Issues similaires
-
Dev-output directory preparation accepts file-valued lib/include paths and fails on dangling linksOuverteteam-cli
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
Les mainteneurs répondent en général sous 2 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 66/100
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 93/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 73/100
inverse-inc/packetfence#9728 ·
Les mainteneurs répondent en général sous 1 jour
-
fix(char-create): show the real reason a character is refusedPeut-être pris @baphomello l’a pris il y a 1 jour. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
Les mainteneurs répondent en général sous 1 jour