You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When extending a class that is annotated with @DataObject, vertx-codegen must be in the compile classpath. Otherwise the project will not compile. Especially when using an AnnotationProcessor (like Lombok), the code that would be generated by by the annotation processor is not generated and the subsequent compiler errors (in case of lombok that all getters, setters are not there) are overwelming the line that class file for io.vertx.codegen.annotations.DataObject not found (which then causes a very long error search).
Reproducer:
Test.java
import io.vertx.core.VertxOptions;
import lombok.Data;
@Data
public class Test {
public static void main(String[] args) {
new Test().setTest(1);
}
private int test; // Lombok should generate the setter used above in the main method
private class MyOwnOptions extends VertxOptions {
// just an example
}
}
> Task :compileJava FAILED
1 actionable task: 1 executed
error: cannot access DataObject
class file for io.vertx.codegen.annotations.DataObject not found
/Users/xxxx/dev/experiments/vertxlombok/src/main/java/Test.java:9: error: cannot find symbol
new Test().setTest(1);
^
symbol: method setTest(int)
location: class Test
2 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.
* Try:
> Run with --info option to get more log output.
> Run with --scan to get full insights.
BUILD FAILED in 196ms
In that small example there is only one error about code that should be generated by Lombok, though in my real project there were hundrets of errors, that made it difficult to see the real issue
The text was updated successfully, but these errors were encountered:
Version
4.5.1 and 4.5.2
Context
When extending a class that is annotated with
@DataObject
, vertx-codegen must be in the compile classpath. Otherwise the project will not compile. Especially when using an AnnotationProcessor (like Lombok), the code that would be generated by by the annotation processor is not generated and the subsequent compiler errors (in case of lombok that all getters, setters are not there) are overwelming the line thatclass file for io.vertx.codegen.annotations.DataObject not found
(which then causes a very long error search).Reproducer:
Test.java
build.grade.kts
Produces the following output:
In that small example there is only one error about code that should be generated by Lombok, though in my real project there were hundrets of errors, that made it difficult to see the real issue
The text was updated successfully, but these errors were encountered: