Introduce API revision checks
sembler opened this issue · comments
The release of version 1.5.0 revealed some accidental API changes that broke user code. It was suggested that we incorporate Revapi into our build process to compare against previous releases and discover any breaking changes.
@tipsy can we use the verify goal for actions for this project? Or at least include the Revapi 'check' goal?
Out of curiosity: what were those incompatible changes? Should we restore something?
Basically the return types of TagCreator were no longer compatible with compiled libraries. I also noticed that some methods are gone, such as withRole() for ATags. I think we've gone past restoring things at this point. But we can at least ensure that this is more easily caught before merges.
Edit:
You can see the full list of errors by changing <artifact>com.j2html:j2html:1.5.0</artifact>
to <artifact>com.j2html:j2html:1.4.0</artifact>
in the POM for the revapi-maven-plugin. and then running the verify phase.
Yes, probably 1.5.0 should have been 2.0.0.
The generated classes support only those attributes that are allowed per HTML specification, so many (wrongly used) attributes are gone, which is indeed no longer compatible.