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 :)
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).
发布评论
评论(2)
Lombok 不进行两次编译。从技术上讲,它“减慢”了编译过程,因为它除了编译时发生的常见事情之外还运行,但与解析阶段、较低阶段和翻译阶段相比,lombok 甚至几乎没有注册。
主要的脆弱性问题是在编辑器中编辑lombok化代码,该编辑器不是(A)愚蠢的(即记事本或diff查看器),(B)eclipse,(C)netbeans,或(D)通过运行javac获得所有大脑(例如带有java插件的vim),它会很糟糕。如果这不适用,那么样板文件的减少只会让你的代码不那么脆弱。
免责声明:我是 lombok 的两个主要开发人员之一:)
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 :)
我在为大型 Java 和 Java 开发 Google Web Toolkit (GWT) 前端时使用了 Project Lombok。 Swing UI 应用程序。由于我没有使用 @SneakyThrows,因此我在运行时不需要 lombok.jar。
使用 delombok 行为,我提供了一个 2stage 编译过程。
Lombok注释的java代码=> Java代码=> Javascript
对于大型java项目的适用性来说,delomboking Web前端的代码需要不到2秒, gwt 编译过程的其余部分大约需要 50 秒(这些指标取自开发人员工作站)。
我们本周正在考虑是否为应用程序的其余部分提供 Lombok 支持。构建主应用程序大约需要 1 小时(包括在配备 2 个 Intel E5450 的盒子上构建的单元测试、安装程序等)。
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).