AOT compilation in Cursive

By default Cursive will not compile Clojure namespaces as part of the build process. If you need compilation, you can enable it in Settings→Build, Execution, Deployment→Compiler→Clojure Compiler.

The most important options are the first ones - these control which (if any) namespaces will be compiled and should be self explanatory.

There are also further options for control of various aspects of the compilation process. You can choose whether your Clojure code should be compiled before or after your Java code, depending on which depends on which. You can also see reflection warnings, either only for your project code or for project dependencies as well, and you can also choose to disable locals clearing in case you’re going to be debugging the code you’re compiling.

The IntelliJ internal compiler

Version 12 of IntelliJ was migrating from the previous internal compiler (where compilation was performed in the IDE process) to an external compiler where an external process is started to perform the compilation. Cursive no longer supports the internal compiler. It’s deprecated in IntelliJ 13 but Cursive does not support it in v12 either. You will be shown a warning in the configuration screen if Clojure compilation is enabled and the internal compiler is selected.