haskell-unordered-containers / hashable

A class for types that can be converted to a hash value
BSD 3-Clause "New" or "Revised" License
103 stars 86 forks source link

Minor release 1.4.3.0 introduces semantic changes #277

Closed andreasabel closed 1 year ago

andreasabel commented 1 year ago

The fix of #270 changed the hashing algorithm. This was released as minor bump 1.4.3.0. I think it should be released as major bump 1.5.0.0 instead. The semantic change introduced in #270 leads to observable behaviour changes downstream. E.g. HashSet.toList will return elements in a different order when build with hashable-1.4.3.0 in comparison to 1.4.2.0. In the wild:

Suggested fix (from the perspective of this issue): deprecate 1.4.3.0 and release as 1.5.0.0.

phadej commented 1 year ago

Note: the hash is not guaranteed to be stable across library versions, operating systems or architectures. For stable hashing use named hashes: SHA256, CRC32 etc.