...
What do we want to AOT-compile?
- Just some a few things
- For the Interop case
- Or to shorten build times
- Not currently supported
- Everything
- For the "Application delivery", "Syntax check", and "reflection warnings" cases
- Currently supported by
clojure.core/compile
...
- Why is AOT-compilation transitive?
- Clojure does not support separate compilation
- All symbols must resolved at compile time
compile-filesis a boolean
- Clojure does not support separate compilation
- The effects of transitive compilation when AOT-comipiling a namespace "A"
- When namespace A loads namespace B within the same project
- Namespace B is AOT-compiled and emitted
- When namespace A loads library C from external JAR
- Library C's namespaces are AOT-compiled and emitted alongside A's
- When namespace A loads namespace B within the same project
- Work-arounds
- Build tools: filter unwanted .class files from JAR
- Ant, Maven, scripting
- Clojure itself does this, e.g. "slim" JAR
- Tedious
- Not commonly used
- Wastes time during builds to AOT-compile things which will be deleted
- Write Java
- Fairly common
- Build tools: filter unwanted .class files from JAR
Proposed solutions
...