Skip to content

Comments

Bump ANTLR Version to 4.13.2#5159

Merged
RyanL1997 merged 1 commit intoopensearch-project:mainfrom
mengweieric:feature/antlr-version-bump-4.13.2
Feb 21, 2026
Merged

Bump ANTLR Version to 4.13.2#5159
RyanL1997 merged 1 commit intoopensearch-project:mainfrom
mengweieric:feature/antlr-version-bump-4.13.2

Conversation

@mengweieric
Copy link
Collaborator

Description

Bump ANTLR4 from 4.7.1 to 4.13.2 across all modules that directly declare it.

Changes

Version updated in 5 modules:

  • commonantlr4-runtime (api dependency)
  • pplantlr4 (codegen tool) + antlr4-runtime
  • sqlantlr4 (codegen tool) + antlr4-runtime
  • legacyantlr4 (codegen tool) + antlr4-runtime
  • async-query-coreantlr4 (codegen tool)

Why 4.13.2

  • antlr4ng (frontend runtime) requires ATN serialization v4 when reconstructing lexer/parser from serialized ATN data.
  • ANTLR 4.7.1 uses ATN serialization v3; ANTLR ≥ 4.10 produces/consumes ATN v4.
  • 4.13.2 is the latest stable ANTLR4 release, so we target it to minimize future upgrades and pick up bug fixes.

Backwards Compatibility

  • The .g4 grammar sources are expected to remain compatible with ANTLR 4.13.2; this change primarily updates the generated lexer/parser code by regenerating it under the newer ANTLR toolchain.
  • ANTLR minor-version upgrades may introduce differences in parsing behavior at the margins (especially error recovery paths, error messages, and reported line/column positions). CI coverage (unit + integration tests) is used to validate that existing SQL/PPL functionality remains correct and that no regressions are introduced.

Related Issues

Resolves #[Issue number to be closed when this PR is merged]

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • New functionality has javadoc added.
  • New functionality has a user manual doc added.
  • New PPL command checklist all confirmed.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff or -s.
  • Public documentation issue/PR created.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 19, 2026

📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Updated ANTLR dependencies to version 4.13.2 across multiple build configurations.
    • No functional, control-flow, or public API changes; no user-facing behavior differences.

Walkthrough

ANTLR dependencies are upgraded from 4.7.1 to 4.13.2 across five Gradle build files. These are dependency-version-only edits; no code, logic, or public API changes.

Changes

Cohort / File(s) Summary
ANTLR Dependency Updates
async-query-core/build.gradle, common/build.gradle, legacy/build.gradle, ppl/build.gradle, sql/build.gradle
Updated org.antlr:antlr4 and/or org.antlr:antlr4-runtime versions from 4.7.1 → 4.13.2 in Gradle build files. No other functional changes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Bump ANTLR Version to 4.13.2' clearly and concisely summarizes the main change—updating ANTLR dependency across multiple modules.
Description check ✅ Passed The description provides detailed context about the ANTLR version bump, including affected modules, rationale, and backwards compatibility considerations.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
ppl/build.gradle (1)

51-55: Centralize the ANTLR version in gradle.properties.

4.13.2 is hardcoded in all five updated files, while every other dependency version in the project is driven by a ${var} variable. A future bump will again require touching all five files.

♻️ Proposed refactor

In gradle.properties:

+antlr_version=4.13.2

Then in each build.gradle:

-    antlr "org.antlr:antlr4:4.13.2"
+    antlr "org.antlr:antlr4:${antlr_version}"
-    implementation "org.antlr:antlr4-runtime:4.13.2"
+    implementation "org.antlr:antlr4-runtime:${antlr_version}"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@ppl/build.gradle` around lines 51 - 55, The ANTLR dependency version is
hardcoded as "4.13.2" in the antlr configuration and the implementation
dependency; add a single property (e.g. antlrVersion=4.13.2) to
gradle.properties and replace the literal "4.13.2" in the antlr declaration and
the implementation "org.antlr:antlr4-runtime:4.13.2" with the property reference
(e.g. ${antlrVersion}) so all build.gradle files use the centralized
antlrVersion; update any other build.gradle files that declare
"org.antlr:antlr4" or "org.antlr:antlr4-runtime" to use the same ${antlrVersion}
variable.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@ppl/build.gradle`:
- Around line 51-55: The ANTLR dependency version is hardcoded as "4.13.2" in
the antlr configuration and the implementation dependency; add a single property
(e.g. antlrVersion=4.13.2) to gradle.properties and replace the literal "4.13.2"
in the antlr declaration and the implementation
"org.antlr:antlr4-runtime:4.13.2" with the property reference (e.g.
${antlrVersion}) so all build.gradle files use the centralized antlrVersion;
update any other build.gradle files that declare "org.antlr:antlr4" or
"org.antlr:antlr4-runtime" to use the same ${antlrVersion} variable.

@mengweieric mengweieric added enhancement New feature or request and removed v3.6.0 Issues targeting release v3.6.0 labels Feb 19, 2026
Signed-off-by: Eric Wei <mengwei.eric@gmail.com>
@mengweieric mengweieric force-pushed the feature/antlr-version-bump-4.13.2 branch from bd6b9cf to 6b7198d Compare February 20, 2026 23:12
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
ppl/build.gradle (1)

51-55: Consider centralizing the ANTLR version in a shared properties file.

The version string 4.13.2 is hardcoded independently in five build.gradle files. Centralizing it (e.g., in gradle.properties or a version catalog libs.versions.toml) reduces the risk of a partial upgrade next time.

#!/bin/bash
# Check if a central version catalog or gradle.properties already manages this
fd --type f 'gradle.properties' | xargs grep -l "antlr" 2>/dev/null
fd --type f 'libs.versions.toml' | xargs grep -l "antlr" 2>/dev/null
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@ppl/build.gradle` around lines 51 - 55, Replace the hardcoded ANTLR version
literal "4.13.2" used in declarations like antlr "org.antlr:antlr4:4.13.2" and
implementation "org.antlr:antlr4-runtime:4.13.2" with a single centralized
property (e.g., add antlrVersion=4.13.2 to gradle.properties or add an entry in
libs.versions.toml) and reference that property from this build.gradle; ensure
you update the other build.gradle files to use the same centralized variable so
all ANTLR artifacts (org.antlr:antlr4 and org.antlr:antlr4-runtime) are driven
by one version definition.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@ppl/build.gradle`:
- Around line 51-55: Replace the hardcoded ANTLR version literal "4.13.2" used
in declarations like antlr "org.antlr:antlr4:4.13.2" and implementation
"org.antlr:antlr4-runtime:4.13.2" with a single centralized property (e.g., add
antlrVersion=4.13.2 to gradle.properties or add an entry in libs.versions.toml)
and reference that property from this build.gradle; ensure you update the other
build.gradle files to use the same centralized variable so all ANTLR artifacts
(org.antlr:antlr4 and org.antlr:antlr4-runtime) are driven by one version
definition.

@RyanL1997 RyanL1997 merged commit 26912a3 into opensearch-project:main Feb 21, 2026
37 of 38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request PPL Piped processing language

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants