print-dup for sorted sets and maps presume a nonexistent static create method that takes an IPersistentCollection
Can't read back
add create methods taking IPersistentVector to collections
emit something different from print-dup
java version "1.8.0"
Java(TM) SE Runtime Environment (build 1.8.0-b132)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b70, mixed mode)
It's trying to invoke PersistentTreeSet.create(ISeq) with ["123"]. It's not clear to me where the vector comes from?
It’s a particular case of CLJ-1461. Vector comes from reading output of print-dup:
I already have a patch for PersistentTreeSet (attached here). Can look into CLJ-1461 later.
Comment made by: mikerod
This won't work for sorted sets (or maps) that are defined with a custom Comparator though via fn's like sorted-set-by etc. I think the round-trip print to read result would then be confusing and incorrect right?
Even more troublesome to me here is that I see no clear way to make print-dup capable of handling the case of a custom Comparator correctly. Arbitrary functions are black boxes and we have no generally, effective way to print-dup them (based on my research I assume this to be correct). We can always make special wrapped fn's for that, but again, not general.