It would be great if all Clojure contrib libraries were updated (if
needed) for Clojure 1.6's new hash function, before Clojure 1.6 is
released.
It would also be nice to update to 3rd party Clojure libraries that
implement their own custom collections, that would otherwise still
calculate old hash values. Having a custom set or map that implements
= correctly when comparing against other set and map implementations,
but still calculates the old hash function, can lead to bugs. For
example, not being able to find a set element/map key if those
collections are themselves used as elements in PersistentHashSet or
keys in PersistentHashMap collections.
Summary of current hash update status:
+ 1 test in Clojure has not been updated for new hash function
+ at least 4 Clojure contrib libraries still need updates
+ 1 3rd party library definitely needs updates, and I'm looking for
others.
More details below, if you are interested. Please do reply if you can
think of any other Clojure contrib or 3rd party libraries not already
mentioned below that implement collections that might need updating.
Andy
+ 1 test in Clojure has not been updated for new hash function
Rich disabled a few failing test in Clojure itself when making the
hash changes in this commit:
https://github.com/clojure/clojure/commit/dff9600387b962f16fc78e6477e10e34651fd366
I believe all but one of those disabled tests have since been updated
to be independent of Clojure's hash function with this commit:
https://github.com/clojure/clojure/commit/91dd867b4229a31d4d915aece97f41b3811cf4d4
The only exception I know of is a still-commented-out test in file
test/clojure/test_clojure/java_interop.clj at or near line 311:
;;(test-to-passed-array-for hash-set)
+ at least 4 Clojure contrib libraries still need updates
Several Clojure contrib projects had test failures when Clojure
changed its hash functions, but have since been updated to correct
this:
tools.namespace -
http://dev.clojure.org/jira/browse/TNS-16
tools.nrepl -
https://github.com/clojure/tools.nrepl/commit/93de0e0e9b60a4ee3e64918456055bc9f3760bcbThere were probably one or two more such projects in the past, but I
have forgotten the details.
Projects that have test failures, and patches written that correct the
test failures, but not committed yet:
core.cache -
http://dev.clojure.org/jira/browse/CCACHE-33
core.match -
http://dev.clojure.org/jira/browse/MATCH-94Projects that have no test failures, but only because their Maven-run
test suites currently contain no tests that depend upon Clojure's hash
function -- if they did, they would have test failures. There are
tests to catch this in Zach Tellman's collection-check library, but
they are currently only run via Leiningen's 'lein test', not Maven.
The tickets mentioned have patches adding such tests and updating the
hash functions for Clojure 1.6, but the patches could use updating to
take advantage of the Clojure APIs Alex Miller added to calculate
hashes of ordered and unordered collections:
core.rrb-vector -
http://dev.clojure.org/jira/browse/CRRBV-3 data.avl -
http://dev.clojure.org/jira/browse/DAVL-3
+ 1 3rd party library definitely needs updates, and I'm looking for
others.
There are other 3rd party libraries that could use updating for
Clojure 1.6's new hash functions. Off the top of my head, this one
definitely needs updating:
immutable-bitset -
https://github.com/ztellman/immutable-bitsetThere are others that I don't know whether updates are needed:
core.matrix -
https://github.com/mikera/core.matrix flatland/useful -
https://github.com/flatland/useful
flatland/ordered -
https://github.com/flatland/orderedDoes anyone know of any other collection implementations to check?