core.rrb-vector

core.rrb-vector fails on JDK 11 EA builds

Details

Description

I tried to test boot on JDK 11 EA builds and there seems to be fipp somewhere in the dependency chain that has core.rrb-vector 0.0.11 as dependency. It fails with the below error :

java.lang.IllegalArgumentException: Must hint overloaded method: toArray
clojure.lang.Compiler$CompilerException: java.lang.IllegalArgumentException: Must hint overloaded method: toArray, compiling:(clojure/core/rrb_vector/rrbt.clj:282:1)
clojure.lang.ExceptionInfo: java.lang.IllegalArgumentException: Must hint overloaded method: toArray, compiling:(clojure/core/rrb_vector/rrbt.clj:282:1)

Reference Travis build : https://travis-ci.org/tirkarthi/boot/jobs/398611988#L803

This was passing a few days back but fails as of now. Feel free to close this if it's fixed in master and it's not released yet.

Successful build : https://travis-ci.org/tirkarthi/boot/jobs/398610834

Activity

Hide
Will Cohen added a comment -

This patch adds type hints on the [this arr] arity of toArray, which leads to a successful compile and test on JDK 11 EA 21. Also works on JDK 8 and 10.

Show
Will Cohen added a comment - This patch adds type hints on the [this arr] arity of toArray, which leads to a successful compile and test on JDK 11 EA 21. Also works on JDK 8 and 10.
Hide
Michał Marczyk added a comment -

Thanks! Applied and pushed. Will cut a release soon.

Show
Michał Marczyk added a comment - Thanks! Applied and pushed. Will cut a release soon.
Hide
Will Cohen added a comment -

Thanks! Also, I only signed/submitted the Clojure CA this morning. Let me know if there's anyone else I need to follow up with there.

Show
Will Cohen added a comment - Thanks! Also, I only signed/submitted the Clojure CA this morning. Let me know if there's anyone else I need to follow up with there.
Hide
Andy Fingerhut added a comment -

For future reference, in case anyone besides me is curious, this error did not occur with JDK 10 and earlier, because the only 1-parameter method named "toArray" in interface java.util.Collection was this one: https://download.java.net/java/early_access/jdk11/docs/api/java.base/java/util/Collection.html#toArray(T%5B%5D) with signature "<T> T[] toArray​(T[] a)"

Starting with JDK 11, another 1-parameter method named "toArray" was added to interface java.util.Collection: https://download.java.net/java/early_access/jdk11/docs/api/java.base/java/util/Collection.html#toArray(java.util.function.IntFunction) with signature "default <T> T[] toArray​(IntFunction<T[]> generator)"

Thus without the type hint, the Clojure compiler had no way to determine which method was intended in a deftype form that tried to define toArray with 1 parameter ('this' plus 1 more parameter in the Clojure deftype method definition).

Show
Andy Fingerhut added a comment - For future reference, in case anyone besides me is curious, this error did not occur with JDK 10 and earlier, because the only 1-parameter method named "toArray" in interface java.util.Collection was this one: https://download.java.net/java/early_access/jdk11/docs/api/java.base/java/util/Collection.html#toArray(T%5B%5D) with signature "<T> T[] toArray​(T[] a)" Starting with JDK 11, another 1-parameter method named "toArray" was added to interface java.util.Collection: https://download.java.net/java/early_access/jdk11/docs/api/java.base/java/util/Collection.html#toArray(java.util.function.IntFunction) with signature "default <T> T[] toArray​(IntFunction<T[]> generator)" Thus without the type hint, the Clojure compiler had no way to determine which method was intended in a deftype form that tried to define toArray with 1 parameter ('this' plus 1 more parameter in the Clojure deftype method definition).
Hide
Karthikeyan Singaravelan added a comment -

Thanks @jafingerhut for the information. Relevant commit : http://hg.openjdk.java.net/jdk/jdk11/rev/3ef0862bbb3d . It also seems to cause issues with Clojure's master branch and the patch by Will Cohen helps tests to pass. I have opened a related issue there : https://dev.clojure.org/jira/browse/CLJ-2374

Show
Karthikeyan Singaravelan added a comment - Thanks @jafingerhut for the information. Relevant commit : http://hg.openjdk.java.net/jdk/jdk11/rev/3ef0862bbb3d . It also seems to cause issues with Clojure's master branch and the patch by Will Cohen helps tests to pass. I have opened a related issue there : https://dev.clojure.org/jira/browse/CLJ-2374
Hide
Kanwei Li added a comment -

Any chance there could be a new release of rrb-vector? JDK 11 is now in RC and it seems the issue has been fixed on master. Thanks!

Show
Kanwei Li added a comment - Any chance there could be a new release of rrb-vector? JDK 11 is now in RC and it seems the issue has been fixed on master. Thanks!
Hide
Ghadi Shayban added a comment -

This is in the latest release, I think this ticket can be closed.

Show
Ghadi Shayban added a comment - This is in the latest release, I think this ticket can be closed.

People

Vote (1)
Watch (1)

Dates

  • Created:
    Updated: