With print-dup true, if an object being printed has a metadata map with only a :tag key, the printer renders it as "^value". This can cause an IllegalArgumentException if you try to read the printed string back in, in some circumstances. E.g.
user=> (read-string (let [ge (with-meta (gensym) {:tag Object})] (binding [*print-dup* true] (pr-str ge))))
IllegalArgumentException Metadata must be Symbol,Keyword,String or Map clojure.lang.LispReader$MetaReader.invoke (LispReader.java:732)
This is causing problems with sleight/riddley's (link: 1) handling of the (case) macro, which drops a type-hint on a gensym it incorporates in the form it returns. When sleight tries to reserialize a macroexpanded (case) form from riddley, it fails as demonstrated above. E.g.
user=> (read-string (binding [*print-dup* true] (pr-str (macroexpand '(case 1 1 1)))))
user=> IllegalArgumentException Metadata must be Symbol,Keyword,String or Map clojure.lang.LispReader$MetaReader.invoke (LispReader.java:732)
The attached patch corrects this by making core_print.clj's print-meta always print out the full metadata map if print-dup is true. The patch also contains a test for this case.
(link: 1) https://github.com/ztellman/sleight https://github.com/ztellman/riddley