Hi all,
The NullAway PR is ready for review:
https://github.com/apache/calcite/pull/5213
It is not urgent, but it should land sooner or later, and a month
should give everyone time to look. Unless someone objects, I plan to
merge it on November 16.
It builds on #5278, which was merged on October 3. Now that javac 25
compiles everything, the bytecodeCheck failures from my August 31 mail
are gone, and the JDK 8 and JDK 11 jobs pass.
What it gives:
- Nullness is checked in the main code of 23 modules instead of 3,
by one CI job ("ErrorProne and NullAway"). A nullness error fails that job
only, so the test jobs keep reporting test failures.
- The annotations are JSpecify, which IntelliJ, Kotlin, Error Prone
and the Checker Framework all read, so users of Calcite see the
same nullness in their own tools.
What changes for users:
- Every published module depends on org.jspecify:jspecify, and
calcite-core and calcite-linq4j also depend on a new
calcite-annotations artifact. Code that imports org.checkerframework
annotations and gets checker-qual only through Calcite has to declare
checker-qual itself.
- calcite-annotations holds five annotations JSpecify does not define,
such as @MonotonicNonNull and @Contract. They get a module of their
own because the package becomes public API with the next release.
- Method signatures in the bytecode do not change.
What changes for contributors: nothing in a plain build. Nullness is
checked with ./gradlew -PenableErrorprone classes jmhClasses.
A few workarounds wait for NullAway releases; they do not block the
merge, and the PR description lists them with everything else.
One question for committers: the PR has 63 commits, one area per
commit. Should I merge them as they are, or squash them?
Vladimir