Conversation
This is a first attempt to make a faster incremental build by omitting the lib (stdlib) module. Because profiles are applied on top of the default configuration, I had to trim the default module set and instead activate the lib modules via a missing property "core". This allows specifying "-Dcore" to skip building the lib (stdlib) module. Because the property will normally be unset, all executions without "-Dcore" will continue to build stdlib.
|
The best way to conditionally active the "lib" module I have found is to only add it to the active modules when a property "core" is unset. This allows a developer to pass "-Dcore" to For me this reduces the zero-change rebuild time from 12-13s down to 6.5-7.5s. I believe this does not impact any other build configurations since the "core" property will always be unset by default. |
This patch attempts to do the following: * Avoid building the sources jar during shading, since it adds time and produces many duplicate file warnings. We explicitly re-activate the sources jar in the release profile (and others). * Avoid compression of the shaded jar except during release and other profiles. I'm not sure this is working right, because it appears the files are still getting compressed.
|
@mkristian If you have any suggestions here I would appreciate the help! I am having some difficulty figuring out how to disable jar compression; nothing I do seems to turn it off. Also, it seems I can only disable the build of the shaded sources jar at the top-level configuration. I've pushed a patch for you to review. Obviously we don't want to break maven central pushing, so we need the sources jar to be generated and deployed during release. cc @enebo for any concerns or ideas |
|
I remember a few years ago |
|
@enebo |
This is a series of patches to make a fast-as-possible incremental build profile.
Reducing the build
Currently when doing a default build of JRuby, the three modules "core" (jruby-base, the actual JRuby sources), "shaded" (jruby-core, the combined JRuby and dependencies jar), and "lib" (jruby-stdlib) are always build. The "lib" module is expensive to build because it launches JRuby to conditionally fetch and unpack or install gems to populate the standard library. This can become tedious when iterating on source-only changes to JRuby.
Making jar builds faster
The core and shaded jar files are always built with full compression, which is unnecessary and slow for local incremental builds. The shaded jar also builds a shaded sources jar which is useless for local development and produces warnings about duplicate files. We can make these jars faster to build and omit unnecessary bits.