From 5c3fa8bb0f74cd1ad99ce618903256b63e5daf19 Mon Sep 17 00:00:00 2001 From: Olof-Joachim Frahm Date: Thu, 18 Aug 2016 21:39:56 +0200 Subject: [PATCH] Add Java, Lombok and Kotlin post. --- lombok-kotlin.post | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 lombok-kotlin.post diff --git a/lombok-kotlin.post b/lombok-kotlin.post new file mode 100644 index 0000000..bde9557 --- /dev/null +++ b/lombok-kotlin.post @@ -0,0 +1,33 @@ +;;;;; +title: Java integration woes +tags: java,kotlin +date: 2016-08-18 21:26:13 +format: md +;;;;; + +Just a quick note on the JVM ecosystem since I've been wrestling with getting +several different technologies to work together: It's a mess really. + +The specific setup in this case is a mostly Java based project, sprinkled with +some Kotlin code (which I only expect to grow in the future), using Maven as +the build system. Added to that some Kotlin annotations (in lieu of using +Kotlin in the first place). + +Todays (and yesterdays) adventure was trying to get the Error Prone checker +integrated with the existing system, which proved quite impossible, due to the +fact that it's using a modified compiler(!) which conflicts with the use of +Lombok annotation processing. + +There are workarounds in the sense that Lombok can also be used to produce +processed Java files (instead of byte code generation), however it seems like +that process is less capable than the IDEA / internal processing and would have +me remove a lot of `val` instances that didn't get their type inferred +properly, making it an arduous process. + +Summing this up, the fact that these tools integrate on different levels of the +"stack", while also making tinkering with it relatively hard due to byte code +generation, complicates this endeavour greatly. In the end I resolved to drop +the Error Prone integration in favour of the much easier to setup SonarQube +platform. I also hope that annotation processing for Lombok will improve such +that we don't need workarounds in case of "invisible" getters anymore, for +example. -- 1.7.10.4