- Max Rydahl Andersen
- Lukas Krejci
The project idea is to utilize the already existing revapi setup and enhance it to properly check and generate documentation for api breakages in a way that help users and extension writers.
This will be an important element in Quarkus releases and will be used heavily across all extensions. The revapi integration will have many year impact on ensuring Quarkus development team and users will be able to upgrade and migrate for years to come.
Quarkus is a Kubernetes-native Java framework tailored for GraalVM and HotSpot, crafted from best-of-breed Java libraries and standards. It was created to enable Java developers to create applications for a modern, cloud-native world.
To learn more about Quarkus visit here
Revapi is a full featured API checker for Java and beyond. It is an API analysis and change tracking tool written in Java.
Its focus is mainly on Java language itself but it has been specifically designed to not be limited to just Java.
To learn more about Revapi visit here
Over the period of the program, I worked on enhancing the current revapi reporting to be useful. It had 3 main tasks:
- Make it easy to record/update api-changes.xml file in project for PR
- Reduce false positive from revapi output/report
- Make output pretty/functional
The api-changes.xml
file is part of the configuration of revapi, it contains the changes that you know of and you want to ignore so that they don't break the build anymore, so this is the file that the developers would want to update so that it becomes part of the PR and the people can review it to help clarify things.
The way revapi initially works if enabled, it will fail the build or give a warning, and developers won't actually know what to do.
When you run revapi, it generates api-changes-suggestions.xml
file in the target directory. This file contains suggestions of the new changes you might want to ignore.
The aim is to simplify this process.
I wrote a jbang script that will take the snippet in the api-suggestion.xml
file and records it in the api-changes.xml
file.
To run revapi use this command in any of the modules:
mvn -Papi-check -Drevapi.skip=false -DskipTests verify
To run the JBang script:
jbang revapi-update
Link to PR: quarkusio/quarkus/pull/26677
There are a lot of changes happening in quarkus that should not be relevant for revapi.
The goal is about defining the right "API surface" for revapi. It should not consider changes in internal classes as breaking/incompatilbe changes.
I configured one of the revapi extensions(revapi.filter) to restrict the analysis only to quarkus extension API.
Link to PR: quarkusio/quarkus/pull/27037
The report was not easy to read.
The aim is to prettify the report and make it more useful.
Below are some screenshots of what the report now looks like:
Link to PR: quarkusio/quarkus/pull/26678
There's still some work to be done on improving revapi usage in Quarkus.
Here are some of the future goals:
- Automate revapi usage in Quarkus CI build
- Document and script for daily usage of revapi
- Implement additonal revapi checks for i.e. property, library and configuraton changes
I want to thank my amazing mentors Max Rydahl Andersen and Lukas Krejci for their constant support and guidance through out the program, from having online meetings with me, to providing information and suggestions whenever I got stuck, to answering my almost everyday questions.
I also want to thank Google for organizing this program. It has giving me the opportunity to learn from this amazing mentors. I had a fantastic learning experience.