views:

155

answers:

2

Is anybody out there using Project Lombok for a large scale production system? How does it influence your compile process (i.e. does it do two-pass compilation, slow it down, make it more fragile)?

+8  A: 

Lombok doesn't do two-pass compilation. Technically it 'slows down' the compile process in that it runs in addition to the usual things that occur when you compile, but compared to the parse phase, the lower phase, and the translation phase, lombok barely even registers.

The major fragility issue is that editing lombokified code in an editor that is NOT either (A) dumb (i.e. notepad or a diff viewer), (B) eclipse, (C) netbeans, or (D) gets all its brains by running javac (e.g. vim with java plugin), it's going to suck. If that doesn't apply, the reduction of boilerplate should only make your code less fragile.

DISCLAIMER: I'm one of the two main developers of lombok :)

Reinier Zwitserloot
Cool! This answers a lot of questions I have, but unfortunately not the one I asked (an example or suitability of large-scale production use), so I'm only upvoting and not accepting.
Jacob
+1  A: 

I used Project Lombok whilst developing a Google Web Toolkit (GWT) front end for large java & Swing UI application. As I did not use @SneakyThrows, I did not require lombok.jar at runtime.

Using the delombok behavior I provide a 2stage compilation process. Lombok annotated java code => Java code => Javascript

In terms of suitability for large java projects, delomboking the code for the web front end takes less than 2 seconds, the rest of the gwt-compilation process takes ~50 seconds (These metrics are taken from a developer work station).

We are considering this week if we will provide Lombok support to the rest of the application. Building the main application takes around 1 hour (including unit tests, installers etc built on a box with 2xIntel E5450's).

Syntax