3

I have just updated my system from Java 8 to the OpenJDK Java 11 version. I have one project that won't compile and I get the following error:

Java.lang.IllegalArgumentException: Must hint overloaded method: 
toArray, compiling:(flatland/ordered/set.clj:19:1)
Exception in thread "main" java.lang.IllegalArgumentException: Must 
hint overloaded method: toArray, compiling: 
(flatland/ordered/set.clj:19:1)

From the looks of it, this error was fixed here: https://dev.clojure.org/jira/browse/CLJ-2374

So I update my project to clojure 1.10.0-RC3 and now I get this error:

Syntax error compiling deftype* at (flatland/ordered/set.clj:19:1).
Exception in thread "main" Syntax error compiling deftype* at 
(flatland/ordered/set.clj:19:1).

Has anyone seen this error OR is there a way for me to expand Clojure's error messages to show me which dependency in my project is failing during compilation (could be multiple)?

I also noticed that I copied over the dependency list which was failing in my first project to a new project and the new project compiled. However, I didn't reference the dependencies or call functions from the deps list. Does Clojure bring in the dependencies/libraries and then reference the required dependencies from the libraries that are included in my project.clj?

EDIT*** I found that this is likely the error.

https://github.com/amalloy/ordered/pull/37

  • 1
    I had the same error, but I haven't realised it was the Java update to version 11 that triggered the problem. I couldn't update the version of the dependence so I just went back to the version 8 with `sudo update-alternatives --config java`. – Jp_ Jun 03 '19 at 16:23

1 Answers1

2

You already have an answer though I thought i'd leave my general process for this incase it's useful for folks who come along later:

  • turn of any auto AOT in my tooling so i can get a repl witout triggering the problem.
  • load namespaces one at a time till i find one that triggers the problem (this usually doesn't take long ;-)
  • comment out half the dependencies of that namespace and evaluate the ns form at the top of the file
  • do a binary search till i find the one or two that trigger it
  • load just that dependency in a scrap project.
  • ... lots of effort ...
  • SUCCESS !
Arthur Ulfeldt
  • 90,827
  • 27
  • 201
  • 284