apiguardian icon indicating copy to clipboard operation
apiguardian copied to clipboard

Introduce tools for @API annotation processing

Open marcphilipp opened this issue 7 years ago • 5 comments

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

  • https://github.com/junit-team/junit5/issues/144

Deliverables

  • ?

marcphilipp avatar Sep 17 '17 15:09 marcphilipp

Update: moved ideas from https://github.com/junit-team/junit5/issues/144 to here.

sbrannen avatar Sep 20 '17 15:09 sbrannen

Added link to jdeprscan.

sbrannen avatar Sep 26 '17 14:09 sbrannen

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

sormuras avatar Nov 14 '17 10:11 sormuras

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 avatar Mar 18 '18 21:03 FilipMalczak

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?

FilipMalczak avatar Mar 21 '18 17:03 FilipMalczak