This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-02-20
Channels
- # announcements (1)
- # architecture (14)
- # asami (21)
- # babashka (1)
- # beginners (44)
- # biff (6)
- # calva (24)
- # clojure (16)
- # clojure-europe (12)
- # clojurescript (32)
- # cursive (23)
- # datascript (5)
- # honeysql (8)
- # hyperfiddle (1)
- # malli (1)
- # nextjournal (34)
- # nrepl (4)
- # off-topic (64)
- # re-frame (12)
- # reagent (1)
- # releases (2)
- # reveal (41)
- # shadow-cljs (137)
- # spacemacs (4)
- # xtdb (5)
Hi all! I am new to Clojurescript, coming from an R/ Python background. As a long-time PyCharm user I was delighted to find Cursive 🙂 ! Currently working through http://learn-clojurescript.com. I quite like Clojure up until now 🙂! Clojurescript seems to be set up correctly, I can run basically everything up until now from the command line and editing files within IntelliJ. However, I cannot get Cursive to work in a deps.edn project setting. I constantly keep getting the error
Could not create shim: Could not create shim
(stacktrace attached below). I'm IntelliJ IDEA Ultimate 2021.3.2. Cursive is the latest non EA-version.
I've tried
• downgrading both IntelliJ and the plugin
• re-installing IntelliJ while clearing the Cache
• running from both Windows and WSL2 (how cool is that by the way)
• different SDKs (SDK 11, Temurin,
• after finding an earlier thread in here changing something in the Deps setting and hitting apply, does not do anything neither
I'd be super grateful for a pointer! Tried other IDEs, but VS Code/ Calva confuses me (though seems to work). Really want to get Cursive to work.stacktrace:
I was just looking at this yesterday. Does upgrading tools.deps on the command line help? To prompt Cursive to pick that up, you might need to go to Preferences | Build, Execution, Deployment | Build Tools | Clojure Deps, let it report the version and then hit apply.
@U0567Q30W thanks for looking into this! I upgraded tools.deps.alpha to 0.12.1148 (still new to this but added it to my user.depn and hit clj on the command line and it upgraded) and as you said, when I went to the ... | Clojure Deps menu, the version appeared. Error sadly persists, stacktrace has also not changed 😞
@U0349822389 Can you try this, please? 1. Open Help->Diagnostic Tools->Debug Log Settings. 2. In the box that’s opened, enter #cursive.deps.DepsShimProvider and press Ok. 3. Reproduce the problem. 4. Check your log file from Help->Show log in Finder/Explorer for lines mentioning DepsShimProvider, and let me know what they say.
You should either see a path to an uberjar, or a list of files making up a classpath, probably in your Maven repo.
@U064X3EF3 Assuming the log entries show Mario using the correct version, any other ideas why this might be happening? This is problem we discussed the other day, but the assumption that the user’s version of deps CLI is out of date looks like it might not be the case.
@U0567Q30W Ok, I've done this. As you said, the line shows a (long) list of files making up the classpath. Start of the latest entry:
2022-02-21 10:51:21,482 [ 23976] DEBUG - #cursive.deps.DepsShimProvider - Executing deps 0.12.1148 directly, classpath C:\Users\Mario\.m2\repository\org\clojure\tools.deps.alpha\0.12.1148\tools.deps.alpha-0.12.1148.jar:C:\Users\Mario\.m2\repository\org\apache\maven\resolver\maven-resolver-api\1.6.3\maven-resolver-api-1.6.3.jar:C:\Users\Mario\.m2\repository\org\ap (...)
As far as I can tell, it's using the correct version?The error is about missing stuff from Clojure 1.10 - can you see what version of Clojure is on that classpath?
It looks like the version on the classpath is clojure-1.9.0.jar - I am a bit confused because my user deps.edn and my project deps.edn include 1.10.3 (that's also what calling clj in the terminal yields)
really a question for @U0567Q30W - I don't know how all that shim stuff works. tools.deps.alpha 0.12.1148 depends on Clojure 1.10.3, so not sure how that classpath is being made
Thanks - it's a hint. As a hail mary, I've also tried manually deleting the 1.9.0 folder from the maven repository, but then setting the latest clojure deps version in ... | Clojure Deps downloads it again
what is interesting is that if I delete 1.9.0 and then launch a fresh project with deps.edn set to the default
{:deps {org.clojure/clojurescript {:mvn/version "1.10.520"}}}
I get an error
Cannot execute - downloaded deps classpath not found:
C:\Users\Mario\.m2\repository\org\clojure\clojure\1.9.0\clojure-1.9.0.jar
@U0567Q30W I found a solution! I tried creating a Leiningen project. Upon creating it, the IDE reminded me that there were two Maven repositories Build tools | Maven | Repositories that were not updated (the two remote ones: http://repo.clojars.org and http://repo1.maven.org/maven2). I updated those. Leiningen started working. Then I went back and created a brand new deps project and now everything works.
@U0349822389 Could you DM me or email me the full classpath list from your log? Email is <mailto:[email protected]|[email protected]>.
This is a problem in deps, https://clojure.atlassian.net/browse/TDEPS-222. I’ll get a workaround into the next build.
@U0349822389 1.12.2-eap5 is out now, and has a fix for this problem as described here: https://groups.google.com/g/cursive/c/O_oettEjv40/m/agRLYvdBCAAJ. I’m not sure how your previous fix could have worked, but this should do it. You’ll need to switch to using EAPs, see https://cursive-ide.com/userguide/#choosing-to-receive-eap-beta-builds. If you’d rather not use EAPs, then I think just using Deps 0.11.x versions should work. If you want to do that, just go to Preferences | Build, Execution, Deployment | Build Tools | Clojure Deps and configure the version there.
@U0567Q30W sorry for being late, glad you were able to reproduce the problem. looking forward to the EAP. Cursive is amazing!
yeah and for my "fix", that was not really a solution as you suspected, while it led to Cursive being able to proceed a bit further (no shim error anymore and run REPL option appeared on deps.edn), IntelliJ then started to crash building the classpath.
@U0567Q30W happy to report back that after a fresh re-install of IntelliJ + Cursive latest EAP + updating Clojure Deps, everything seems to work fine now.