Skip to content

Release 0.6.3#37

Merged
siy merged 4 commits into
mainfrom
release-0.6.3
Jun 7, 2026
Merged

Release 0.6.3#37
siy merged 4 commits into
mainfrom
release-0.6.3

Conversation

@siy

@siy siy commented Jun 7, 2026

Copy link
Copy Markdown
Owner

Patch release 0.6.3.

Fixed

  • Legacy interpreter (PegEngine) cut-failure symmetry: Optional, ZeroOrMore, OneOrMore, and bounded repetition swallowed the pending-trivia snapshot on the CutFailure path; all four now restore symmetrically (+5 tests).
  • Re-enabled LexerGeneratorTest.parity_triviaClassification_lineAndBlockComments — both skip reasons resolved by the 0.6.2 folded-%whitespace fix.

Notes

  • 0.6.2 deploy-time anomaly investigated and resolved as Maven Central publish-queue wait (no build change needed).
  • Test suite at zero skips: 1424 tests across 7 modules, 0 failures.

Summary by CodeRabbit

  • Bug Fixes

    • Fixed legacy interpreter's handling of repetition combinators with trivia to correctly restore state on cut failures.
  • Tests

    • Re-enabled trivia parity tests; all 1424 tests across 7 modules now run without skips.

@siy siy merged commit f025a22 into main Jun 7, 2026
1 of 2 checks passed
@coderabbitai

coderabbitai Bot commented Jun 7, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3f51586e-d75c-4459-959c-66b63549287f

📥 Commits

Reviewing files that changed from the base of the PR and between 57566b8 and e3576a9.

📒 Files selected for processing (14)
  • CHANGELOG.md
  • README.md
  • docs/HANDOVER.md
  • docs/VISITOR-TUTORIAL.md
  • peglib-core/pom.xml
  • peglib-core/src/main/java/org/pragmatica/peg/parser/PegEngine.java
  • peglib-core/src/test/java/org/pragmatica/peg/perf/TriviaAdversarialTest.java
  • peglib-core/src/test/java/org/pragmatica/peg/v6/generator/LexerGeneratorTest.java
  • peglib-formatter/pom.xml
  • peglib-incremental/pom.xml
  • peglib-maven-plugin/pom.xml
  • peglib-playground/pom.xml
  • peglib-runtime/pom.xml
  • pom.xml

📝 Walkthrough

Walkthrough

Release 0.6.3 fixes asymmetric trivia state handling in PegEngine's repetition/trivia combinators on the CutFailure path. Four methods now restore pending-trivia snapshots before propagating cuts. Tests validate the fix across Optional, ZeroOrMore, OneOrMore, and bounded repetition scenarios. All project artifacts updated to 0.6.3 with changelog and documentation reflecting zero test skips.

Changes

Release 0.6.3 with CutFailure Symmetry Fix

Layer / File(s) Summary
PegEngine CutFailure Trivia Restoration
peglib-core/src/main/java/org/pragmatica/peg/parser/PegEngine.java
Four repetition/trivia methods (parseZeroOrMoreWithMode, parseOneOrMoreWithMode, parseOptionalWithMode, parseRepetitionWithMode) now restore the saved pendingLeadingTrivia snapshot on the CutFailure path when triviaPostPass is disabled, creating symmetry with regular failure paths.
CutFailure Symmetry Test Coverage
peglib-core/src/test/java/org/pragmatica/peg/perf/TriviaAdversarialTest.java, peglib-core/src/test/java/org/pragmatica/peg/v6/generator/LexerGeneratorTest.java
TriviaAdversarialTest replaces a disabled test with the enabled OptionalCutFailureSymmetry suite that verifies cut failures propagate out of Optional, ZeroOrMore, OneOrMore, and bounded repetition with consistent trivia state. LexerGeneratorTest re-enables the lexer/trivia parity test.
Release Documentation Updates
CHANGELOG.md, README.md, docs/HANDOVER.md, docs/VISITOR-TUTORIAL.md
Changelog documents the 0.6.3 CutFailure fix and re-enabled tests with 1424 tests at zero skips. README, VISITOR-TUTORIAL, and HANDOVER updated with 0.6.3 version references and clarification of deploy-time delay from Maven Central's publish queue.
Maven Version Bumps to 0.6.3
pom.xml, peglib-core/pom.xml, peglib-formatter/pom.xml, peglib-incremental/pom.xml, peglib-maven-plugin/pom.xml, peglib-playground/pom.xml, peglib-runtime/pom.xml
All module and parent POMs updated from version 0.6.2 to 0.6.3.

🎯 2 (Simple) | ⏱️ ~12 minutes


🐰 A trivia bug hops no more,
Snapshots saved on CutFailure's shore,
Tests now bloom from disabled sleep,
Zero skips—the suite runs deep!
Version bumped, release complete,
PegLib's patch is oh-so-neat!

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch release-0.6.3

Comment @coderabbitai help to get the list of available commands and usage tips.

@siy siy deleted the release-0.6.3 branch June 7, 2026 05:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant