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

Parser regression: valid multi-component package declaration fails in AI::Prolog

Chiusa
#1,399 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à
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
72/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
perl
Ambito
compilers

Direzione di ricerca

Inizia esaminando il commit 95b8824a9 e il percorso di parsing delle dichiarazioni di package, quindi riproduci il problema con t/35clause.t e t/50engine.t. Aggiungi una copertura del progetto per una dichiarazione di package valida con più componenti e verifica che sia il backend JVM sia quello dell’interprete superino i test mirati senza la diagnostica fuorviante.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

Summary

AI::Prolog 0.741 has a regression under PerlOnJava when loading AI::Prolog::TermList::Clause.

Reproduction

CPAN random tester run: 20260916-111623-23683

Affected upstream tests:

  • t/35clause.t
  • t/50engine.t

Both fail on the JVM backend and the interpreter backend. The first failure is:

Failed test 'use AI::Prolog::TermList::Clause;'
Error: package operator requires an identifier at ../lib/AI/Prolog/TermList/Clause.pm line 1, near ";"

The source begins with the valid declaration:

package AI::Prolog::TermList::Clause;

The same parser failure then prevents AI::Prolog::Engine from loading in t/50engine.t.

Expected result

Under system Perl, with the exact dependency versions selected by the CPAN run, both focused tests pass: 49 tests successful.

Actual result

PerlOnJava reports 2 of 19 test programs failing, with 2 of 414 subtests failed overall. The regression is recorded against the previous passing run from 2026-08-28.

Suspected cause

The regression appears to have been introduced by commit 95b8824a9 (fix: validate package version declarations), which added validatePackageVersion(parser) to package declaration parsing. A valid multi-component package declaration is being compiled with a non-identifier operand, producing the misleading package operator requires an identifier diagnostic.

This should be reduced to project-owned parser regression coverage for a valid multi-component package declaration, then verified on both execution backends.

The full system-Perl distribution suite was not completed because the local environment lacks the transitive prerequisite Carp::Assert; this does not affect the focused system-Perl comparison above.

Lingua principale
Perl
Stelle
64
Fork
6
Merge medio
4h 29m
PR unite (30g)
185

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.