AOT in my experience is a little dicey and complicated.

On Tue, Jan 7, 2014 at 7:26 PM, Dave Tenny <dave.te...@gmail.com> wrote:

> So if I sample some clojure jars in my local maven .m2 directory, most of
> the jar files have only clojure code, and a project.clj.
> If I look at the org.clojure project there, it has many java class files,
> what appear to be corresponding clojure source files, and *no* project.clj.
>
> With only a little experiencing on some single AOT compiled modules, I
> wondered
>
> 1) When and under what circumstances projects are compiled in  source
> versus .class form?
>

In general, you always want to distribute libs as maven artifacts with
source included and no AOT compilation.  Adding in compiled classes means
also adding a dependency on whatever clojure version was used to compile
those classes.  The effects of this lead to often confounding errors.

As an extra caveat, AOT currently does not make it easy to separate that
project's class files from every other deps generated class files, so any
project artifact will have extra classfiles in it.  My company has grappled
with separating these about five different ways in order to not distribute
source, and there is a ticket to address it, but it looks like it'll
persist.


> 2) Why there is no project.clj in the org.clojure jar file?
>

Clojure itself isn't built with leiningen, hence no project.clj.


> 3) When the clojure 'compile' function comes into play in your typical
> clojure project deployments? (vs. :aot targets or other leiningen
> deployment techniques).
>
> Any pointers or enlightenment on the above questions appreciated.
> I read the clojure "compilation" page, but I haven't quite put together
> what that's telling me about *how* to comjpile a file and gen-class a class,
> versus why I see all these clojure .m2 jar files with no classes
> whatsoever.
>
> Thanks,
>
> Dave
>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to