Skip to content

valuehash fails to meet contract for map entries #4

@cch1

Description

@cch1

Consider this expression:

(let [v [:a 1]
      me (find {:a 1} :a)]
  [(= v me) ; true
   (= (valuehash.api/sha-1 v) ; false
      (valuehash.api/sha-1 me))])

=> [true false]

This discrepancy is particularly scary when using disparate mechanisms to construct Datomic lookup refs with the expectation that clojure.core/= (and equivalent Datomic lookup semantics) imply equal hash values.

Observed with ff1d4b7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions