> > > Note that you cannot mix Java and Clojure sources within the same
> > > project.

It is supported in the latest changeset.  The following configurations
are possible:

---------------------
Just Clojure:
 * src/main/clojure

Clojure and Scala:
 * src/main/clojure
 * src/main/scala

Clojure, Scala and Java:
 * src/main/clojure
 * src/main/scala
 * src/main/java

Clojure and Groovy:
 * src/main/clojure
 * src/main/groovy

Clojure, Groovy and Java:
 * src/main/clojure
 * src/main/groovy
 * src/main/java

Clojure and Java:
 * src/main/clojure
 * src/main/java
---------------------

You'll notice that "Clojure, Scala and Groovy" is not among the
possibilities.  This is because the Groovy joint compiler and the
Scala joint compiler both expect to be able to interleave Java
dependencies within their type resolution process.  They do not have
support for the same functionality with each other, meaning that
circular dependencies cannot be compiled between the two languages.

Note that this is all predicated on a (possibly faulty) assumption
about the Clojure compiler: everything must be late-bound.  If
Clojure's compiler needs to resolve types at compile-time, then this
could potentially fail in unexpected ways.  Specifically, circular
dependencies between Clojure and Java/Scala/Groovy would not be
possible.  In such a case, you would need to somehow factor the
circularity out into a separate .clj file and then exclude that file
from compilation (forcing late binding).  I honestly don't know if
this is the compiler's behavior or not, but I thought it was worth the
warning.

One small change: in order to use this functionality now, you will
need to include the following line at the top of your buildfile:

require 'buildr/clojure'

Joint compilation with Scala/Java or Groovy/Java does not necessitate
an extra "require", but this first one is necessary to get the process
started and ensure that Clojure's compiler becomes the dominant
selection.

Daniel
--~--~---------~--~----~------------~-------~--~----~
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
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to