pubref / rules_kotlin

Bazel rules for Kotlin
Other
159 stars 20 forks source link

update the worker protocol. #54

Closed hsyed closed 6 years ago

hsyed commented 6 years ago

@pcj #50 got up to speed with the worker protocol and it seems it has changed in recent versions of bazel. The fix below gets it working again. --strategy=KotlinCompile=worker --worker_verbose.

Some of he debug outputs aren't needed any longer with this approach.

pcj commented 6 years ago

What speedup metrics are you seeing?

I'm getting a new message HINT: Kotlin will compile faster if you run: echo "build --strategy=Kotlin=worker" >>~/.bazelrc, however, it does not actually speedup unless I use the mnemonic KotlinCompile, not just Kotlin.

hsyed commented 6 years ago

@pcj I was trying to measure the performance improvements and it seemed like activating the worker had made things worse. I found a lot of issues, the work the preloader did was not being retained between invocations, the Compiler was also being dropped.

I reimplemented the worker code and broke the dependency on the Kotlin compiler. You should see 2-4x speed increase (and it ramps up the more workers you have :D).