<< Back to previous view

[CRRBV-3] Add hash tests and hash fixes for Clojure 1.6 Created: 09/Feb/14  Updated: 25/Jun/14  Resolved: 30/Mar/14

Status: Closed
Project: core.rrb-vector
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Enhancement Priority: Minor
Reporter: Andy Fingerhut Assignee: Michał Marczyk
Resolution: Completed Votes: 0
Labels: None

Attachments: File crrbv-3-v1.diff     File crrbv-3-v1-test-only.diff    


With the changes planned to hash functions in Clojure 1.6, it would be good to enhance core.rrb-vector so that it continues to work with Clojure 1.5.1, but is prepared to calculate hash functions on its data structures consistent with Clojure 1.6's changes, too.

Comment by Andy Fingerhut [ 09/Feb/14 11:54 PM ]

Patch crrbv-3-v1.diff is one way to update the hash function for Clojure 1.6. I have tested it with the latest Clojure master as of Feb 8 2014, plus the current patches for these tickets:

CLJ-1339, CLJ-1331, CLJ-1335, CLJ-1336, CLJ-1344

It would be best to wait until the patches for these have been applied, and see if any changes are made to them that would affect this patch.

Comment by Michał Marczyk [ 14/Feb/14 1:50 PM ]

See https://github.com/clojure/core.rrb-vector/tree/new-hasheq for a commit using the new hash-ordered-coll.

Comment by Michał Marczyk [ 14/Feb/14 1:52 PM ]

...which is, by the way, broken because of new hashes of empty collections. Will fix in a moment.

Comment by Michał Marczyk [ 14/Feb/14 1:59 PM ]

Ok, seems to work now.

Comment by Andy Fingerhut [ 14/Feb/14 7:41 PM ]

Looks fine to me. It would be nice to add some tests that are run automatically by the build server on every commit to Clojure, rather than having to discover it with a manually run test.

Comment by Andy Fingerhut [ 16/Feb/14 11:50 AM ]

Patch crrbv-3-v1-test-only.diff is identical to crrbv-3-v1.diff, except it only includes additions to the test suite run by 'mvn test', so that whatever problems it catches would be caught by the automated Maven builds done on clojure.org's build machine.

I have verified that with your new-hasheq branch changes and this patch, all of the tests pass with Clojure 1.5.1 and 1.6.0-beta1. Also that without your new-hasheq changes, these tests fail with 1.6.0-beta1, as they should.

Comment by Michał Marczyk [ 30/Mar/14 11:40 AM ]

My new-hasheq branch has been merged to master for a while now.

Also, I applied crrbv-3-v1-test-only.diff to master, then simplified it a bit in the next commit. Thanks!

Generated at Wed Jan 17 09:28:10 CST 2018 using JIRA 4.4#649-r158309.