Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[apex] Use same ANLTR version for apex-parser #4845

Closed
adangel opened this issue Mar 1, 2024 · 0 comments · Fixed by #4848
Closed

[apex] Use same ANLTR version for apex-parser #4845

adangel opened this issue Mar 1, 2024 · 0 comments · Fixed by #4848
Labels
an:enhancement An improvement on existing features / rules
Milestone

Comments

@adangel
Copy link
Member

adangel commented Mar 1, 2024

Is your feature request related to a problem? Please describe.
PMD uses a different ANTLR version than apex-parser:

We have already a workaround to just ignore this warning message and hope, that the two versions are still compatible:

/**
* Suppresses the warnings about mismatched ANTLR runtime/compilation version.
* <p>ApexParser is using ANTLR 4.8, but PMD is using ANTLR 4.9.</p>
*/
public final class AntlrVersionCheckSuppression {

Describe the solution you'd like

  • Update Summit AST and apex-parser, remove this AntlrVersionCheckSuppression

Describe alternatives you've considered

  • Update apex-parser to use the same ANTLR version
  • Just reuse the antlr grammar from apex-parser and generate the parser in PMD (but we don't use the grammar directly, we use it through Summit AST)
  • Use apex-dev-tools with updated ANTLR

Additional context
Originated from TODO:

// TODO: log is not empty due to ANTLR versions, 4.9.1 vs 4.8, expect to resolve with apex-dev-tools switch
log = log.replace("ANTLR Tool version 4.8 used for code generation does not match the current runtime version 4.9.1", "");
log = log.replace("ANTLR Runtime version 4.8 used for parser compilation does not match the current runtime version 4.9.1", "");

@adangel adangel added the an:enhancement An improvement on existing features / rules label Mar 1, 2024
@adangel adangel added this to the 7.x milestone Mar 1, 2024
@adangel adangel mentioned this issue Mar 1, 2024
4 tasks
@adangel adangel removed this from the 7.x milestone Mar 1, 2024
@adangel adangel added this to the 7.0.0 milestone Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
an:enhancement An improvement on existing features / rules
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant