<< Back to previous view

[CLJCLR-63] Mistake in Java translation in clojure.core.reducers/fold Created: 23/Jan/15  Updated: 23/Jan/15

Status: Open
Project: ClojureCLR
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Major
Reporter: David O'Meara Assignee: David Miller
Resolution: Unresolved Votes: 0
Labels: reducers
Environment:

.Net 4.0


Attachments: Text File 0001-When-the-function-foldvec-calls-fjtask-it-passes-in-.patch    
Patch: Code

 Description   

Fold will fail in the following example:

user=> (require '[clojure.core.reducers :as r])
nil
user=> (r/fold + (vec (range 0 10000)))
InvalidCastException Unable to cast object of type 'clojure/core/reducers$foldvecfn_22973_22977' to type 'System.Func`1[System.Object]'. clojure/core/reducers/fjtask--22518 (reducers.clj:73)

Please take a look at reducers.clj.

When the function foldvec calls fjtask it passes in a IFn, not a Func. Func is required by System.Threading.Task's ctor. Create the Func using sys-func. A .Net 4.0 build will throw the following exception without this change.



 Comments   
Comment by David O'Meara [ 23/Jan/15 11:26 AM ]

An IFn in Java implements Callable, which prevents this problem in Java. In C# there is no equivalent.





[CLJCLR-62] Make Task35 accessible for reducers Created: 23/Jan/15  Updated: 23/Jan/15

Status: Open
Project: ClojureCLR
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Major
Reporter: David O'Meara Assignee: David Miller
Resolution: Unresolved Votes: 0
Labels: reducers
Environment:

.Net 3.5


Attachments: Text File 0001-Make-Task35-accessible-for-reducers.patch    

 Description   

A .Net 3.5 build will throw this exception:

user=> (require '[clojure.core.reducers :as r])
nil
user=> (r/fold + (vec (range 0 10000)))
MethodAccessException clojure.lang.Task35.RunSynchronously() clojure/core/reducers/fjinvoke--22524 (reducers.clj:94)

Making Task35 public fixes this.






[CLJCLR-61] Compile and ilmerge clojure.core.reducers. Created: 23/Jan/15  Updated: 23/Jan/15

Status: Open
Project: ClojureCLR
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Major
Reporter: David O'Meara Assignee: David Miller
Resolution: Unresolved Votes: 0
Labels: reducers
Environment:

Release builds for .Net and Mono


Attachments: Text File 0001-Compile-and-ilmerge-clojure.core.reducers.patch    
Patch: Code

 Description   

clojure.core.reducers was left out of post-build compile and ilmerge. This is not as noticeable for debug builds since they can fall back to source.

For example:
1. Download from here:
http://sourceforge.net/projects/clojureclr/files/clojure-clr-1.6.0-Release-4.0.zip/download
2. Unzip and run the following, you should see this error:

C:\Users\Dave\Downloads\clojure-clr-1.6.0-Release-4.0\Release 4.0>Clojure.Main
Clojure 1.6.0
user=> (require '[clojure.core.reducers :as r])
FileNotFoundException Could not locate clojure.core.reducers.clj.dll or clojure/core/reducers.clj on load path. clojure/core$load_lib$fn_17276_17280.invoke (:0)

This patch should add reducers to the lists for compilation and ilmerge.






Generated at Wed Jan 28 06:13:06 CST 2015 using JIRA 4.4#649-r158309.