There are a bunch of things in the build file that "do nothing without
complaining" when clojure.jar isn't set.

I didn't want to make a radical change to the build file with this
checkin but I didn't want users to not get the pretty printer and
wonder why either.

More generally, I think we need to think through how we want contrib
built and tested. I would say that we probably want to force the
compile and fail if clojure.jar isn't specified. And as you say, make
test running dependent on clojure-contrib.jar having been built. (In
general, ant's predilection for ignoring failure has always befuddled
me.)

Another question is whether we should duplicate the classes and
the .clj files in the jar or should we just compile all of them. Is
there some value to having the source there?

I'm happy to tweak these things if we have consensus on how we'd like
to do it.

Tom

On Apr 6, 5:37 am, Stuart Halloway <stuart.hallo...@gmail.com> wrote:
> Hi Tom,
>
> I think that the ant test tasks should depend on the compilation  
> tasks, and that users will just have to specify a clojure.jar.
>
> Either that or the default test suite should be smart enough to skip  
> the pretty printer tests with ant.jar not specified.
>
> Stuart
>
> > By (semi-)popular demand, I have added the pretty printer and the
> > Common Lisp format function (which are really the same package) into
> > clojure.contrib. It all lives in the namespace clojure.contrib.pprint.
>
> > Important: If you want to use pretty printing, you will have to
> > compile all the source code in clojure.contrib and not just put it in
> > in the jar. To do this, need to tell ant where clojure.jar is so that
> > it can run the compiler. For example, I use:
>
> >  ant -Dclojure.jar=../clojure/clojure.jar
>
> > (This is necessary because pretty printing uses a couple of gen-
> > classed classes to wrap java Writers.)
>
> > I haven't done that much work on the pretty printer since my last
> > announcement, but there are a few improvements:
>
> > - I added support for *print-level* and *print-length* to control how
> > much output you get.
> > - Support for a bunch more special forms and let-like structures in
> > *code-dispatch*
> > - Support for pretty printing Java arrays
> > - ~3x basic speedup (or 3x less slow, depending on how you look at
> > it). On my machine, this translates into about 300 lines of code/
> > second. More to come here...
> > - Some fixes to allow for deeper structures (as in "very deep")
> > without blowing the stack.
>
> > All in all, it should be a pretty serviceable pretty printer. More
> > coming, though...
>
> > The documentation is still on github, but I've updated it for
> > clojure.contrib. Look here:http://github.com/tomfaulhaber/cl-format.
>
> > Please let me know if you have issues, suggestions, stuff you'd like
> > to see first, etc.
--~--~---------~--~----~------------~-------~--~----~
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