Skip to content

Commit

Permalink
Work around Clojure 1.2 reader bug.
Browse files Browse the repository at this point in the history
Having spawn genomes on the classpath will cause this.
  • Loading branch information
technomancy committed Nov 9, 2011
1 parent b066b33 commit 7dc1b03
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/leiningen/util/ns.clj
Expand Up @@ -23,7 +23,8 @@
(and (.isFile f) (.endsWith (.getName f) ".jar")))

(defn read-ns-form [r f]
(let [form (try (read r false ::done)
;; bug in Clojure 1.2 allows reading "{foo}" and throws when str'd
(let [form (try (doto (read r false ::done) str)
(catch Exception e
(println (format "Couldn't parse %s: %s" f (.getMessage e)))
::done))]
Expand Down

0 comments on commit 7dc1b03

Please sign in to comment.