ClojureDocs

Nav

Namespaces

compile-clj

  • (compile-clj params)
Compile Clojure source to classes in :class-dir.
 Clojure source files are found in :basis paths by default, else in :src-dirs.
 Namespaces and order of compilation are one of:
  * :ns-compile - compile these namespaces, in this order
  * :sort - find all namespaces in source dirs and use either :topo (default)
            or :bfs to order them for compilation
 Options:
  :basis - required, basis to use when compiling
  :class-dir - required, dir to write classes, will be created if needed
  :src-dirs - coll of Clojure source dirs, used to find all Clojure nses to compile
  :ns-compile - coll of specific namespace symbols to compile
  :sort - :topo (default) or :bfs for breadth-first search
  :compile-opts - map of Clojure compiler options:
    {:disable-locals-clearing false
     :elide-meta [:doc :file :line ...]
     :direct-linking false}
  :bindings - map of Var to value to be set during compilation, for example:
    {#'clojure.core/*assert* false}
  :filter-nses - coll of symbols representing a namespace prefix to include
 Additional options flow to the forked process doing the compile:
  :java-cmd - Java command, default = $JAVA_CMD or 'java' on $PATH, or $JAVA_HOME/bin/java
  :java-opts - coll of string jvm opts
  :use-cp-file - one of:
                   :auto (default) - use only if os=windows && Java >= 9 && command length >= 8k
                   :always - always write classpath to temp file and include
                   :never - never write classpath to temp file (pass on command line)
 Returns nil.