Skip to content

valuehash fails to meet contract for map entries #4

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions