Factual / skuld

Distributed task tracking system.
300 stars 13 forks source link

Add Fressian ReadHandler for set #114

Closed danielcompton closed 9 years ago

danielcompton commented 9 years ago

By default Fressian converts sets into java.util.HashSets This is problematic in Clojure 1.6 as it has changed equality for persistent collections containing Java collections.

danielcompton commented 9 years ago

This will convert all Fressian "set" objects back into Clojure PersistentHashSet's. We probably don't need a WriteHandler for this as PersistentHashSets are already serialised as "set" because they implement the java.util.Set interface.

I'd also be open to adding a new fressian type, perhaps "pset", to avoid this so that you can still pass mutable java.util.HashSet's around. I always prefer immutability when possible, particularly with the changes to java object equality in Clojure 1.6, but it is a possibility.

aphyr commented 9 years ago

Thanks, Daniel. :)