<< Back to previous view

[DPRIMAP-1] Implement java.lang.Iterable Created: 04/Sep/12  Updated: 09/Sep/12  Resolved: 09/Sep/12

Status: Resolved
Project: data.priority-map
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Major
Reporter: Alan Malloy Assignee: Sean Corfield
Resolution: Completed Votes: 0
Labels: None

Attachments: Text File iterable.patch    
Patch: Code

 Description   

Clojure collections are expected to implement all relevant java collection interfaces, and things will quietly and subtly break if any are missed. In this case, the reducers library assumes all instances of java.util.Map implement java.lang.Iterable, and since this one doesn't it can't reduce over us, even inefficiently.



 Comments   
Comment by Sean Corfield [ 09/Sep/12 2:30 AM ]

The patch from Alan did not apply but it was only a two line addition so I did that manually. Passes current tests but there are no new tests for Iterable (yet).





[DPRIMAP-6] (empty ...) forgets the comparator Created: 05/Sep/13  Updated: 13/Nov/13  Resolved: 13/Nov/13

Status: Resolved
Project: data.priority-map
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Major
Reporter: Jamie Brandon Assignee: Mark Engelberg
Resolution: Completed Votes: 0
Labels: None

Attachments: Text File dprimap-6-v1.txt    
Patch: Code and Test

 Description   

The current implementation is:

(empty [this] pm-empty)

It should be:

(empty [this] (pm-empty-by (.comparator priority->set-of-items)))

This allows eg:

(into (empty pm) (filter f pm))

It also ensures that clojure.walk works correctly.



 Comments   
Comment by Andy Fingerhut [ 07/Sep/13 8:06 PM ]

Patch dprimap-6-v1.txt adds tests to verify that empty preserves not only the comparator, but also the metadata of the priority map. empty preserves the metadata of all other Clojure collections for which it is implemented.

It also modifies empty to pass these new tests.

Comment by Andy Fingerhut [ 13/Nov/13 3:41 PM ]

Mark Engelberg independently discovered and fixed this issue some time ago.





[DPRIMAP-2] data.priority-map has no artifacts information in the README Created: 14/Sep/12  Updated: 23/Nov/12  Resolved: 23/Nov/12

Status: Resolved
Project: data.priority-map
Component/s: None
Affects Version/s: None
Fix Version/s: None

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


 Description   

data.priority-map README has no artifacts information and does not conform to the Contrib README standards in any way. Because clojure-dev is a closed group, I am filing it here



 Comments   
Comment by Mark Engelberg [ 23/Nov/12 3:01 AM ]

Updated README





[DPRIMAP-4] There is one reflection warning in data.priority-map when invoking .equiv Created: 25/Apr/13  Updated: 13/Nov/13  Resolved: 13/Nov/13

Status: Resolved
Project: data.priority-map
Component/s: None
Affects Version/s: None
Fix Version/s: None

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

Attachments: Text File dprimap-4-eliminate-equiv-reflection-patch-v1.txt    
Patch: Code

 Description   

Reflection warning, clojure/data/priority_map.clj:215:19 - call to equiv can't be resolved.

That line of source is this one inside the deftype for PersistentPriorityMap:
(equiv [this o] (.equiv item->priority o))



 Comments   
Comment by Andy Fingerhut [ 28/Apr/13 2:50 AM ]

Patch dprimap-4-eliminate-equiv-reflection-patch-v1.txt dated Apr 28 2013 eliminates an occurrence of reflection in the call to .equiv by adding a type hint.

Comment by Andy Fingerhut [ 13/Nov/13 3:39 PM ]

Mark Engelberg independently discovered and fixed this issue some time ago.





Generated at Sat Aug 23 15:02:43 CDT 2014 using JIRA 4.4#649-r158309.