Closed timtebeek closed 11 months ago
@stephan202 When running this branch against error-prone-support I do see a rather curious error
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:testCompile (default-testCompile) on project refaster-runner: Compilation failure: Compilation failure:
[ERROR] /home/tim/Documents/workspace/timtebeek/error-prone-support/refaster-runner/target/generated-test-sources/test-annotations/tech/picnic/errorprone/refaster/runner/FooRulesRecipes.java:[25,18] cannot find symbol
[ERROR] symbol: class Generated
[ERROR] location: package javax.annotation
RefasterTemplateProcessor
configured in error-prone-contrib
is active on refaster-runner
javax.annotation.Generated
annotation can not be found there; should we use a different one?Any ideas there? Wouldn't want to release a version that breaks things on error-prone-support, or requires undesired changes there.
somehow the
RefasterTemplateProcessor
configured inerror-prone-contrib
is active onrefaster-runner
Yeah, that's because I moved the annotation processor declaration :)
the
javax.annotation.Generated
annotation can not be found there; should we use a different one?
Indeed, javax.annotation.Generated
is no longer present on newer JDKs, where it's replaced with javax.annotation.processing.Generated
(since JDK 9). IIRC this had something to do with splitting up the javax.annotation
package to comply with the module system. Since you also target JDK 8, this can get a bit messy. Two other options:
@Generated
annotation. Tools such as Error Prone support this, and there's precedent set by e.g. Lombok.@SuppressWarnings("all")
. That matches what Lombok and Immutables do, and since google/error-prone@47f0c72513801eeb2ef19b07f2e3dbdc8414668b this is also supported by Error Prone.Helpful context once again, thanks! Switched to @SuppressWarnings("all")
as that seemed easiest: no additional API surface or dependency. Thanks!
Does that also mean I can drop the empty constructors and Javadoc again? 😇
For https://github.com/PicnicSupermarket/error-prone-support/pull/925 & @Stephan202