rules_kotlin
rules_kotlin copied to clipboard
Distribution archive is very large
We introduced rules_kotlin in a large monorepo with hundreds of engineers. Since there's an eager WORKSPACE load to get kotlin_repositories()
, every engineer immediately is waiting to download 22MB even though no one uses Kotlin yet. Is there something simple we could do to make the distribution smaller and make a subsequent lazy fetch to get large files?
Which version?
I'm working on making the toolchain lazier.
the most recent alpha versions on https://github.com/bazelbuild/rules_kotlin/releases have >22MB tgz files.
Looking very quickly, we have a 9.8 MB jdeps_merger_worker.jar
and a 9.8 MB kotlin_worker.jar
, which looks suspiciously close. They're by far the largest files, followed by jarjar.jar
at 4 MB (I'm not sure how much those files actually take in the compressed archive, but the archive is 22 MB vs 25 MB once extracted, so it doesn't change much).
I have no idea how those two worker jars are built, but if extracting some of the logic (I guess what makes them workers) into a common jar, that would remove over a third of the archive already.