Add ABCL disassembler post.
[blog.git] / lombok-kotlin.post
1 ;;;;;
2 title: Java integration woes
3 tags: java,kotlin
4 date: 2016-08-18 21:26:13
5 format: md
6 ;;;;;
7
8 Just a quick note on the JVM ecosystem since I've been wrestling with getting
9 several different technologies to work together:  It's a mess really.
10
11 The specific setup in this case is a mostly Java based project, sprinkled with
12 some Kotlin code (which I only expect to grow in the future), using Maven as
13 the build system.  Added to that some Kotlin annotations (in lieu of using
14 Kotlin in the first place).
15
16 Todays (and yesterdays) adventure was trying to get the Error Prone checker
17 integrated with the existing system, which proved quite impossible, due to the
18 fact that it's using a modified compiler(!) which conflicts with the use of
19 Lombok annotation processing.
20
21 There are workarounds in the sense that Lombok can also be used to produce
22 processed Java files (instead of byte code generation), however it seems like
23 that process is less capable than the IDEA / internal processing and would have
24 me remove a lot of `val` instances that didn't get their type inferred
25 properly, making it an arduous process.
26
27 Summing this up, the fact that these tools integrate on different levels of the
28 "stack", while also making tinkering with it relatively hard due to byte code
29 generation, complicates this endeavour greatly.  In the end I resolved to drop
30 the Error Prone integration in favour of the much easier to setup SonarQube
31 platform.  I also hope that annotation processing for Lombok will improve such
32 that we don't need workarounds in case of "invisible" getters anymore, for
33 example.