<< Back to previous view

[DFINGER-3] Check whether Iterator implementation correctly implements next by throwing required NoSuchElementException Created: 25/Jun/14  Updated: 25/Jun/14

Status: Open
Project: data.finger-tree
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Minor
Reporter: Andy Fingerhut Assignee: Chouser
Resolution: Unresolved Votes: 0
Labels: None


 Description   

Note: There might not be any bug in data.finger-tree's implementation of Iterator methods. I have not checked the details yet. Just creating reminder tickets to check if there is an issue in data.finger-tree similar to CLJ-1453 in Clojure. Please close as declined with a comment if everything is already implemented correctly here, or it is not applicable for some reason.






[DFINGER-2] Update data.finger-tree to use new hash functions in Clojure 1.6 Created: 15/Feb/14  Updated: 05/Apr/14  Resolved: 05/Apr/14

Status: Closed
Project: data.finger-tree
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Enhancement Priority: Minor
Reporter: Andy Fingerhut Assignee: Chouser
Resolution: Completed Votes: 0
Labels: None

Attachments: File dfinger-2-v1.diff     File dfinger-2-v2.diff     File dfinger-2-v3.diff    

 Description   

Enhance the implementations of at least double-list, counted-double-list, counted-sorted-set, and counted-sorted-set-by to use the new Clojure 1.6 hash function for collections.



 Comments   
Comment by Andy Fingerhut [ 15/Feb/14 4:17 PM ]

Patch dfinger-2-v1.diff updates at least the implementations of the 4 data structures mentioned in the description to use the new hash functions with Clojure 1.6. It has been tested to work with Clojure 1.4.0 and 1.5.1. It will not compile with Clojure 1.3.0 or older because of the addition of the IHashEq interface, which seems to have been added in 1.4.0.

Also has a fix for a bug with CountedSortedSet's implementation of iterable, discovered during testing. The patch adds some basic tests for equivalence and hash equivalence for empty collections and 1 small collection.

Comment by Chouser [ 15/Feb/14 4:55 PM ]

Andy, you're amazing! Thanks for doing all this.

I've got a few tweaks I would make:

  • pull the compile-if usages into a single fn that all the hasheq methods could call
  • do the iterator fixes in a separate commit
  • bump the version number and cut a release

I'd be happy to do any or all of that, or you could push the changes yourself if you'd rather. Your call.

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

Patch dfinger-2-v2.diff separates the iterable fix into a separate commit, and puts the uses of compile-if into their own functions.

I haven't cut a release of any Clojure contrib project before, and do not know the steps.

Comment by Andy Fingerhut [ 17/Feb/14 10:34 AM ]

Patch dfinger-2-v3.diff is identical to dfinger-2-v2.diff, except it corrects a problem where it was not correctly maintaining the hash value for Clojure 1.5.1 and earlier. The updated tests help to catch that.

Comment by Chouser [ 05/Apr/14 11:09 AM ]

Excellent work, Andy, thanks again. I'm cutting a release now. If that goes well, your patches will be included in the 0.0.2 release.





[DFINGER-1] x should be x# in definition of equiv method inside defdigit? Created: 30/Nov/13  Updated: 30/Nov/13  Resolved: 30/Nov/13

Status: Resolved
Project: data.finger-tree
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Minor
Reporter: Andy Fingerhut Assignee: Chouser
Resolution: Completed Votes: 0
Labels: None


 Description   

In this sequence of lines in defdigit:

IPersistentCollection
        (empty [_]) ; TBD ; not needed?
        (equiv [_ x] false) ; TBD
        (cons [_ x#] (digit ~'meter-obj ~@items x#))

it appears like the equiv method should have x# instead of x.

I would not have noticed this, except I have been trying out tools.analyzer and tools.analyzer.jvm on the contrib libraries, and it threw an exception when analyzing method equiv because the defdigit macro expanded into a deftype that had a namespace on the parameter x.



 Comments   
Comment by Chouser [ 30/Nov/13 2:06 PM ]

Fixed, thanks.

https://github.com/clojure/data.finger-tree/commit/eccb3c416e75d61b5cb07f92b7d3dd3047da1833





Generated at Thu Oct 30 23:30:14 CDT 2014 using JIRA 4.4#649-r158309.