This leads to unpredictable results. For example, clojure-contrib
builds perfectly on my machine, but fails on build.clojure.org.
I don't think there's a perfect solution to this, but sorting the
discovered namespaces before compiling would at least make it
predictable.
Sorting in reverse order might be best; that way you would get
"deeper" namespaces before the "shallower" namespaces that typically
depend on them.
-SS
Out of town currently but there is an option to useDeclaredNamespaces or the like from memory. Or maybe that was an earlier codebase?
-- Sent from an Android. Just say no to the iPhone.
Yes, it's not documented but
<compileDeclaredNamespaceOnly>true</compileDeclaredNamespaceOnly>
in the plugin configuration will limit AOT-compilation to the
configured namespaces, in the order they are declared.
-SS
It shouldn't, but it does. In clojure-contrib, the problematic
namespaces are:
1. c.c.pprint.ColumnWriter
2. c.c.pprint.PrettyWriter
3. c.c.pprint
The first two are gen-class'd, and PrettyWriter extends the class
generated for ColumnWriter.
Unless they are compiled in exactly the order given above, the build
fails with a ClassNotFoundException.
-SS
I remember suggesting that any classname being extended by gen-class
be implicitly required as a namespace, but I don't think that was
considered good form. *shrug*.
- Chas