Skip to content

External Build Server

Peter A. Jonsson edited this page May 22, 2014 · 4 revisions

From IntelliJ 12 the Java compilation uses an external build server. The motivation mainly seems to be performance, but it does add some nifty incremental compilation options as well and the Scala plugin uses it for type-based hints. The architecture suits us quite well since that's essentially what we get whether we want it or not anyways.

For some reason IntelliJ felt that jps is a good naming convention for external build servers, and there seems to be hardcoded knowledge in IntelliJ depending on the naming convention.

Design Notes

The external build server is responsible for calling cabal or building things through the GHC-API directly. The configuration of the compiler still resides in the main plugin. The points mentioned in Cabal are still relevant, they just move to a different part of the source code.

IntelliJ 13 defaults to using external builds and there is no way to turn it off.

The external build server lives in jps-plugin in the source tree.

The only way to communicate project settings between the IDE and the build server is through serialization to disk. We have the same solution as the Erlang-plugin: a directory jps-shared that contains tons of stupid boilerplate for automatic serialization of a couple of boolean values and a few strings. Both HaskForce and the jps-plugin depend on the jps-shared data.

Links

IntelliJ description: http://confluence.jetbrains.com/display/IDEADEV/External+Builder+API+and+Plugins

Scala plugin description: http://blog.jetbrains.com/scala/2012/12/28/a-new-way-to-compile/

Clone this wiki locally