The # appears when *print-level* is exceeded in pr/pr-str, just as you get "..." when *print-lengtht* is exceeded:
(pr-str {:foo {:bar {:baz 3}}}) => "{:foo {:bar {:baz 3}}}" (set! *print-level* 2) => 2 (pr-str {:foo {:bar {:baz 3}}}) => "{:foo {:bar #}}" Could it be that a preceding test sets *print-level*? Just a wild guess. Cheers, Caspar On Wednesday, 18 April 2012 02:34:55 UTC+2, nathanmarz wrote: > > So I've been hacking for the past day on making serializable functions > for Clojure (building off the work of @technomancy in his serializable- > fn repo). > > I'm running into a nasty problem though, and I really don't understand > what's going on. One of the things I'm doing in my code ( > > https://github.com/nathanmarz/serializable-fn/blob/master/src/clj/serializable/fn.clj > > ) is trying to capture the source code whenever someone uses the > replacement serializable.fn/fn macro. I'm using &form to do this. > > However, *sometimes*, the form when serialized contains a bunch of > subforms missing. The subforms are replaced with a "#" character. To > serialize I'm just calling pr-str on the form. > > The way the behavior is reproduced is odd as well. If I run the > Cascalog tests (in this branch: > > https://github.com/nathanmarz/serializable-fn/blob/master/src/clj/serializable/fn.clj), > > > everything works fine until one of the last test suites, > cascalog.predicate-test, where I get this behavior (causing > deserialization errors). However, if I run just that test suite (lein2 > test cascalog.predicate-test) it passes. It only fails if I run the > whole test suite, and it always fails the exact same way. So > whatever's causing this behavior is not random but consistent. > > Does anyone know what could be causing this behavior and how to fix it? -- 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