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

[java] Deprecate AST internal API #1846

Merged
merged 10 commits into from Jun 1, 2019
Merged

Conversation

oowekyala
Copy link
Member

Deprecates and marks @InternalApi in the Java AST:

  • Constructors for nodes
  • Abstract classes
  • Setters

Also removes trash JJTree comments. Nodes can then inherit a better documentation on their jjtAccept method for example.

@jsotuyod The plan is to make those package-private if possible, otherwise internal API. This is not urgent on the 7.0.0 branch though. The next steps for the java-grammar branch are

  • Make the parsing of primary expressions stricter (for now they eg accept foo()()::b())
  • Then deal with lambda expressions (they should not be a primary prefix)

@oowekyala oowekyala added in:ast About the AST structure or API, the parsing step is:deprecation The main focus is deprecating public APIs or rules, eg to make them internal, or removing them labels May 28, 2019
@oowekyala oowekyala added this to the 6.16.0 milestone May 28, 2019
@oowekyala oowekyala changed the title [javä] Deprecate AST internal API [java] Deprecate AST internal API May 29, 2019
@pmd-test
Copy link

1 Message
📖 This changeset introduces 0 new violations, 3 new errors and 0 new configuration errors,
removes 0 violations, 3 errors and 0 configuration errors.
Full report

Generated by 🚫 Danger

Copy link
Member

@adangel adangel left a comment

Choose a reason for hiding this comment

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

I'll merge this soon. I've added a couple of more deprecations, especially, I also deprecated+internalized the constructors of the (now deprecated) abstract base classes.

This is not urgent on the 7.0.0 branch though

Not necessarily, but the sooner, the better: Ideally, we would only make methods package private in PMD 7, that are already deprecated. I guess, that we will get some merge conflicts, when merging master -> pmd/7.0.x or java-grammar the next time...

@adangel adangel merged commit fe42056 into pmd:master Jun 1, 2019
@oowekyala oowekyala deleted the java-deprecate-ast branch June 1, 2019 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in:ast About the AST structure or API, the parsing step is:deprecation The main focus is deprecating public APIs or rules, eg to make them internal, or removing them
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants