Skip to content

Fix confirmed diagnostic handling gaps found by #682 - #684

Merged
ggleyzer merged 1 commit into
masterfrom
compiler-diagnostics-fixes
Oct 9, 2026
Merged

ggleyzer merged 1 commit into
masterfrom
compiler-diagnostics-fixes

Conversation

@ggleyzer

@ggleyzer ggleyzer commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

Reviewing #682 by @lagergren brought these concrete gaps in the existing diagnostic path to light. This PR fixes the identified behavior using the current APIs, without adding broader machinery for potential but unproven weaknesses.

  • A branched ErrorList now honors an abort request from its parent listener.
  • The default branch of a callback ErrorListener no longer imposes a one-error limit that the parent did not request.
  • Lexer diagnostics now follow the active parser SafeLookAhead, so discarding an attempt does not leak its lexical errors to the main listener.

The ParserTest regression covers the discarded-lookahead case.

Validation: ./gradlew :javatools:test :xdk:test --configuration-cache (passed).

@ggleyzer
ggleyzer requested review from cpurdy and lagergren October 9, 2026 14:30
@ggleyzer

ggleyzer commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator Author

I intentionally left alone some of the speculative finding in #682 since atm I don't have any indication to whether the are real or imagined.

@lagergren

Copy link
Copy Markdown
Contributor

This fixes some gaps, including one that I still had in the embedding api branch, but there are more. I have folded this PR into the embedding api branch. If you want to merge it separately to master, that is fine by me, I will just re-resolve.

@ggleyzer
ggleyzer merged commit da07a0b into master Oct 9, 2026
10 checks passed
@ggleyzer
ggleyzer deleted the compiler-diagnostics-fixes branch October 9, 2026 15:50
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.

2 participants