Completed
Details
Assignee
Stuart SierraStuart SierraReporter
importimportPatch
Code and TestPriority
Major
Details
Details
Assignee
Stuart Sierra
Stuart SierraReporter
import
importPatch
Code and Test
Priority

Created December 14, 2011 at 10:52 PM
Updated January 10, 2014 at 5:26 PM
Resolved January 10, 2014 at 5:26 PM
The clojure 1.2 reader will allow invalid forms like {:key} to be read in, and only throw an exception on printing. Currently clojure.tools.namespace calls (read rdr) within a try form; the bug means that this particular type of error is never caught. This patch forces the reader to try and resolve with str, allowing clojure.tools.namespace to catch and bury the error.
I was running into this with moustache templates from lein-newnew on the classpath; these contain namespace headers that look like (ns
name
.core). This would cause (clojure.tools.namespace/find-namespaces-on-classpath) to fail when printing its results but not when actually running.