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

Introduce tools for @API annotation processing #2

Open
marcphilipp opened this issue Sep 17, 2017 · 5 comments
Open

Introduce tools for @API annotation processing #2

marcphilipp opened this issue Sep 17, 2017 · 5 comments

Comments

@marcphilipp
Copy link
Member

marcphilipp commented Sep 17, 2017

Ideas

  • Extract all public APIs and generate a report
  • Compare two versions of an artifact for release notes
  • Check correct usage of APIs (internally and externally)
    • The tool should check that @API is only declared on public types/methods.
  • Implement a reporting tool that warns about usage of experimental and deprecated APIs.

Related Issues

Deliverables

  • ?
@sbrannen sbrannen changed the title Implement tool to validate usage of @API Implement tool to validate @API declarations Sep 17, 2017
@sbrannen sbrannen changed the title Implement tool to validate @API declarations Introduce tools for @API annotation processing Sep 20, 2017
@sbrannen
Copy link
Member

Update: moved ideas from junit-team/junit5#144 to here.

@sbrannen
Copy link
Member

Added link to jdeprscan.

@sormuras
Copy link
Contributor

A compiler plugin could be useful: http://www.baeldung.com/java-build-compiler-plugin

@FilipMalczak
Copy link

FilipMalczak commented Mar 18, 2018

I've started writing an approach to this. I've mentioned the general idea here. Instead of plugging into compiler, I intend to extract API descriptor with Google Reflections (I had an approach to Scannotation and gave up) and use it to perform validation and comparison.

You can follow the works here.

@FilipMalczak
Copy link

Check correct usage of APIs (internally and externally)

  • The tool should check that @API is only declared on public types/methods.

What else can we check here? Do we consider internal classes as valid API?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants