Issues with 1.13.3 not being able to find clojure
si-robinson opened this issue Β· comments
Hi
I've been using cursive for years (thanks π) and not encountered this before. Some of the older lein projects I work with no longer work under 1.13.3.
eg On opening a project, when it synchronises, it seems it isn't brining in org.clojure/clojure.
In project.clj, I have this as a dependency:
[org.clojure/clojure "1.10.1"]
But in the Leiningen tool window under my project's dependencies, it's not listed.
Other clojure dependencies we use in the project ARE listed though (eg org.clojure/tools.reader:1.3.6, org.clojure/core.async:1.2.603, etc, etc).
It tells me I need to generate stubs but when I try I'm getting:
Exit code: 1
Error: Could not find or load main class clojure.main
Caused by: java.lang.ClassNotFoundException: clojure.main
Attempting to start a REPL gives:
Error: Could not find or load main class clojure.main
Caused by: java.lang.ClassNotFoundException: clojure.main
Process finished with exit code 1
lein repl
in a term works.
This is on an M1 Mac with IntelliJ IDEA 2024.1 (Community Edition) / Cursive 1.13.3-2024.1 but a colleague on M1 Mac with ultimate is also getting the issue.
Additional:
There is a global exclusion for clojure in the project.clj:
:exclusions [commons-logging
log4j
org.clojure/clojure]
...and removing org.clojure/clojure from that seems to make intellij work again in some of our now-not-working projects.... All worked under pre-1.13 versions without this removal though.
Any help welcome !
So, seems this is to do with a change in leiningen where global exclusions now affect top-level dependencies... IntelliJ only offering versions 2.11.x versions though so can't make it use eg 2.9.1 which I'm currently using locally...