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

[kotlin] Prevent auxiliary grammars from generating lexers #5335

Merged
merged 5 commits into from
Nov 17, 2024

Conversation

jsotuyod
Copy link
Member

@jsotuyod jsotuyod commented Nov 14, 2024

Describe the PR

  • A misconfiguration of Antlr4 produced an auxiliary grammar (UnicodeClasses), that was imported into the main kotlin grammar, to produce it's own Lexer, which was never used.
  • We no longer produce that Lexer, properly moving imports to the standard directory for that.
  • We manually copy a generated version for API compatibility, flagging it as both Generated and Deprecated for removal in PMD 8

Related issues

Ready?

  • Added unit tests for fixed bug/feature
  • Passing all unit tests
  • Complete build ./mvnw clean verify passes (checked automatically by github actions)
  • Added (in-code) documentation (if needed)

 - A misconfiguration of Antlr4 produced an auxiliary gramma
   (UnicodeClasses), that was imported into the main kotlin grammar,
   to produce it's own Lexer, which was never used.
 - We no longer produce that Lexer, properly moving imports to the
   standard directory for that.
 - We manually copy a generated version for API compatibility, flagging
   it as both Generated and Deprecated for removal in PMD 8
@jsotuyod jsotuyod added the in:pmd-internals Affects PMD's internals label Nov 14, 2024
@jsotuyod jsotuyod added this to the 7.8.0 milestone Nov 14, 2024
@pmd-test
Copy link

1 Message
📖 Compared to main:
This changeset changes 0 violations,
introduces 0 new violations, 0 new errors and 0 new configuration errors,
removes 0 violations, 2 errors and 7 configuration errors.
Download full report as build artifact

Generated by 🚫 Danger

pmd-kotlin/pom.xml Show resolved Hide resolved
adangel added a commit that referenced this pull request Nov 17, 2024
adangel added a commit that referenced this pull request Nov 17, 2024
Merge pull request #5335 from Monits:fix-generated-code-kotlin
@adangel adangel merged commit 0cf8f2c into pmd:main Nov 17, 2024
3 checks passed
@jsotuyod jsotuyod deleted the fix-generated-code-kotlin branch November 17, 2024 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in:pmd-internals Affects PMD's internals
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants