contextual icon indicating copy to clipboard operation
contextual copied to clipboard

jdk 11 compatibility fix using toArray type hint

Open benkamphaus opened this issue 6 years ago • 1 comments

Projects that included previous versions of contextual fail on JDK 11 (possibly other post-8 versions) with errors like:

Caused by: java.lang.IllegalArgumentException: Must hint overloaded method: toArray
        at clojure.lang.Compiler$NewInstanceMethod.parse(Compiler.java:8496)
        at clojure.lang.Compiler$NewInstanceExpr.build(Compiler.java:8058)
        at clojure.lang.Compiler$NewInstanceExpr$DeftypeParser.parse(Compiler.java:7934)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:7106)
        ... 153 more

The error cause is described here, this fix is identical to the one applied by core-rrb.vector here.

Can confirm that all tests pass run through lein test :all and in the deps project, and that this resolves JDK 11 executing for jar on a project that depends on contextual.

Also on this PR:

  • bump project.clj to no longer depend on missing test.check snapshot.
  • bump project.clj to depend on Clojure 1.7.0 instead of beta.
  • add minimal deps.edn for git coords.

benkamphaus avatar Jun 17 '19 22:06 benkamphaus

As per most recent commits, another bug that resulted in stack overflows on reflection with low heap or per-thread stack memory settings is resolved by further type annotations.

benkamphaus avatar Jun 22 '19 14:06 benkamphaus