Details
-
Type:
Defect
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:
-
Approval:Vetted
Description
The LispReader tries to read a record instead of a literal if the tag contains periods:
https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/LispReader.java#L1171
Which effectively means that reader tags cannot contain periods.
The EDN spec is unclear on this:
edn supports extensibility through a simple mechanism. # followed immediately by a symbol starting with an alphabetic character indicates that that symbol is a tag.
(issue opened: https://github.com/edn-format/edn/issues/39)
If periods are allowed, then the LispReader should first check to see if the tag is in *data-readers* and only then if not try to initialize a Java class.
I'm happy to write the patch if this behavior is what is desired.
The suggested patch (clj-1100-reader-literal-periods.patch) will break reading records when *default-data-reader-fn* is set. Try adding a test like this: