Share your thoughts in the 2024 State of Clojure Survey!

Welcome! Please see the About page for a little more info on how this works.

0 votes
in data.fressian by

When you come to upgrade Fressian from 1.5.1 to 1.6, the tests will pass, but the equality behaviour in 1.6 is different. For example

(let [val #{}] (= (set [val]) (set [(fressian/read (fressian/write val))])))

This is because Fressian 0.2.0 reads a Fressian set back off the wire as a java.util.HashSet (c.f. DFRS-5), and PersistentHashSet containing an empty PersistentHashSet is no longer equal to a PersistentHashSet containing a java.util.HashSet.

To catch these changes, you will need to use a generative tester which creates nested values (and include sets as well). test.check does arbitrarily deep nested values but doesn't have sets yet (TCHECK-51).

I have put a sample project on GitHub showing this in action https://github.com/danielcompton/data.fressian-test

1 Answer

0 votes
by
Reference: https://clojure.atlassian.net/browse/DFRS-6 (reported by desk@danielcompton.net)
...