Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


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-files is a boolean
  • 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
  • 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

Proposed solutions