Details
-
Type:
Defect
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Completed
-
Affects Version/s: None
-
Fix Version/s: Release 1.5
-
Component/s: None
-
Labels:None
-
Approval:Ok
Description
If you have two data_readers.clj files on the classpath that agree with one another about the mapping of a given literal, Clojure still claims there is a conflict.
This comes up when using checkout dependencies in Leiningen. If the checked-out project contains data_readers.clj, Clojure will throw an exception.
To reproduce:
user=> (spit "/tmp/data_readers.clj" "{foo/bar foo.core/bar}")
nil
user=> (with-redefs [clojure.core/data-reader-urls (constantly [(java.net.URL. "file:/tmp/data_readers.clj")])] (#'clojure.core/load-data-readers))
{foo/bar #'foo.core/bar}
user=> (with-redefs [clojure.core/data-reader-urls (constantly [(java.net.URL. "file:/tmp/data_readers.clj")])] (#'clojure.core/load-data-readers))
ExceptionInfo Conflicting data-reader mapping clojure.core/ex-info (core.clj:4227)