Wow, great !

Some notes I took while reading your e-mail : (those are some pitfalls I
came through while implementing clojuredev's eclipse auto-build feature)

 * does it support namespaces separated in several files (handling files
that begin with 'in-ns, or just not trying to compile them ?)
 * if so, will it support the scenario of multiple files per ns, where just
another file (and not the file defining the ns) is modified ?
 * there is also another problem : if some macros are defined in a namespace
A, used in a namespace B, then if you just change the macro and recompile
namespace A, I don't think code using the macros in namespace B will see the
changes ?

Those considerations, among other things, have made me consider just
recompiling the entire project every time a resource or set of resources
change, so that it is reliable, if not totally optimized (but so far, for
the size of the projects, I guess it's still not a performance bottleneck).

My 0,02 €,

-- 
Laurent


2009/2/21 Daniel Spiewak <djspie...@gmail.com>

>
> I'm pleased to announce preliminary (and very experimental) support
> for the Clojure AOT compiler and REPL within Apache Buildr (http://
> buildr.apache.org).  At present, this support is only available within
> my Git fork available here: git://github.com/djspiewak/buildr.git
> More specifically, Clojure support is available within the "clojure"
> and "master" branches ("master" branch alone contains REPL support).
> It should be possible to install this particular version of Buildr by
> using the following commands, though I'm honestly not sure how up to
> date GitHub's gem repository is:
>
>  gem sources -a http://gems.github.com
>  sudo gem install djspiewak-buildr
>
> Once installed, Clojure support is activated in a project simply by
> storing your .clj scripts within the src/main/clojure directory.  Note
> that the (ns) directive will need to match the subdirectory, otherwise
> compilation will fail.  By default, every script is compiled to the
> target/classes directory.  Namespaces are auto-detected from the
> directory structure.  Only updated files are re-compiled (based on
> mtime of .clj file and its corresponding *__init.class).  If you wish
> to override the auto-detection and specify a reduced set of
> namespaces, it can be done using the `compile.using` directive within
> your project definition in your buildfile.  Thusly:
>
> define 'clojure-contrib' do
>  compile.using :libs => ['clojure.contrib.command-line',
> 'clojure.contrib.mmap']
> end
>
> Any scripts which are *not* pre-compiled will be copied verbatim to
> the target/classes directory w.r.t. their position in the directory
> structure.  Note that you will need to have set CLOJURE_HOME for this
> to work.
>
> You will have to be using the "master" branch from my git repository
> in order to use the Clojure REPL through Buildr (or install via the
> gem command given above).  To invoke, simply run the following command
> somewhere in your project hierarchy:
>
>  buildr shell
>
> This will launch the Clojure REPL pointing at your project's
> dependencies and the updated target/classes directory (compilation is
> re-run if necessary).  Additionally, if you have a valid license for
> JavaRebel, you can make use of it with the REPL by setting the
> REBEL_HOME environment variable.
>
> Note that you cannot mix Java and Clojure sources within the same
> project.  However, this is fairly easy to overcome by splitting the
> languages into separate sub-projects.  Thus, your top-level project
> might contain all of your Clojure sources, while the sub-project might
> contain Java.  There are more details regarding this process on the
> Buildr project page.
>
> One thing to keep in mind is that Buildr was designed to serve as a
> build system for more static languages (specifically: Java, Scala,
> Groovy).  Thus, it is pre-biased toward things like a separate
> compilation phase (the REPL points to target/classes rather than src/
> main/clojure).
>
> Fair warning: this language support is *extremely* experimental and
> probably not too reliable at this point.  Also note that while it is
> possible that Clojure support will be merged into the Buildr trunk in
> future, it has not yet been decided one way or another (see
> https://issues.apache.org/jira/browse/BUILDR-259).  Use at your own
> risk!
> >
>

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