[core] Fix #4972: Update ANTLR from 4.9.3 to 4.13.2#6621
Conversation
Bumps [io.github.apex-dev-tools:apex-parser](https://github.com/apex-dev-tools/apex-parser) from 4.4.1 to 5.0.0. - [Release notes](https://github.com/apex-dev-tools/apex-parser/releases) - [Changelog](https://github.com/apex-dev-tools/apex-parser/blob/main/CHANGELOG.md) - [Commits](apex-dev-tools/apex-parser@v4.4.1...v5.0.0) --- updated-dependencies: - dependency-name: io.github.apex-dev-tools:apex-parser dependency-version: 5.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
|
Compared to main: (comment created at 2026-05-08 10:08:20+00:00 for d4b7d81) |
2c8d48e to
1307e2b
Compare
|
The different unicode escaping in |
adangel
left a comment
There was a problem hiding this comment.
Thanks!
Note, that upgrading antlr will be a breaking change:
https://github.com/antlr/antlr4/releases/tag/4.10
4.10-generated parsers incompatible with previous runtimes
ANTLR not only generates recursive-descent parsers; it generates a state machine called an augmented transition network (ATN) in serialized form as a bunch of integers stored in the generated parser and lexer files. This serialization format was changed for 4.10 to remove a size limit on the supported ATNs. See antlr/antlr4#3591.
The key point here is that we changed the version number stored inside the serialization format and so, in order to use this new version of ANTLR, you must regenerate all of your lexers and parsers using the 4.10 tool and then use the new runtime. Parsers generated with 4.10 or not compatible with previous versions of the runtime.
I guess, we will know, how many downstream users use PMD with antlr and not rebuilding their grammar when building their custom language module, when we release 7.25.0.
But upgrading this allows us to upgrade apex-parser to a version 5+ which hopefully fixes some grammar issues (unfortunately not part of 5.0.0 yet: apex-dev-tools/apex-parser#84 would be needed for #6478 ). So, we should definitely upgrade, then the next upgrade is easier.
I'll update this PR, update release notes, fix swift grammar (remove the hyphen completely) and incorporate #6612
…dev-tools-apex-parser-5.0.0' into pr-6621
1307e2b to
d4b7d81
Compare
Describe the PR
Questions
Is updating apex-parser a breaking change that requires a major version?
I haven't investigated why
SwiftNameDictionaryneeds the added slash. I just know that this makes the test green. Is this a sign of a bigger problem?-> yes. Actually these are tokens/keywords that don't exist and should be removed. But we can't due to #6655.
Related issues
Ready?
./mvnw clean verifypasses (checked automatically by github actions)