Re:Exodus: Easily migrate your JVM code from Maven to Bazel
by erik_seaberg on Tuesday April 06, 2021 @08:55PM
(#26719311)
You get hermetic and cacheable builds, but only if you’re willing to abandon the whole Maven plugin ecosystem and handle a lot of codegen yourself.
[ Parent
| on HN ]
Re:Exodus: Easily migrate your JVM code from Maven to Bazel
by rockwotj on Tuesday April 06, 2021 @09:02PM
(#26719375)
Bazel does embrace code gen, but to be honest I've found rules for most of the code gen I've needed to do and they plug in nicely.
Re:Exodus: Easily migrate your JVM code from Maven to Bazel
by deepsun on Tuesday April 06, 2021 @09:27PM
(#26719519)
I still don't understand, Maven artifacts are hermetic and cacheable, no?
Re:Exodus: Easily migrate your JVM code from Maven to Bazel
by dikei on Tuesday April 06, 2021 @10:07PM
(#26719794)
* Bazel offer much more granular caching, because a Bazel BUILD target is often much smaller than a Maven artifact. For example: a Java BUILD target is often just a single package.
* SNAPSHOT maven artifact are not hermetic and not reliable for caching: Maven only re-fetch SNAPSHOT once a day by defaults, so you will miss changes if you do not explicitly update it. In Bazel, any changes in a BUILD target's input are detected immediately and will trigger a rebuild.
Re:Exodus: Easily migrate your JVM code from Maven to Bazel
by erik_seaberg on Tuesday April 06, 2021 @10:32PM
(#26719946)
Bazel rules are supposed to only read specified inputs and write specified deterministic outputs, and they’re skipped if nothing changed. Maven plugins can do whatever they want, and you decide whether to publish what's on disk.