vavr
vavr copied to clipboard
[internal] Generate API diff report
In preparation for a migration guide from 0.10.x to 1.0, we need to create an API diff report.
There exist a tool japicmp which uses javassist under the hood. It will not cover all of our use cases, e.g. when methods are renamed.
Hi dear @danieldietrich I try to understand the generated report by japicmp (And it was a little bit hard at first impression). then I tried to use it programmatically and the power has unleashed!
Solution 1
My solution is to use an annotation on every method (and also classes) that has been renamed, I mean use the annotation as a flag to find which methods are only renamed. Here is a sample project to manipulate the report by annotation (please also check out the report.md). Here is the vavr's side sample. By the annotation, we could assign some metadata to the method (like the old name) if needed.
- Add a little bit of complexity and code to the VAVR project
- More flexibility
Solution 2
We could also declare a list of method names in the sample and use the list for generating API diffs.
- Less flexibility