This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (6)
- # babashka (61)
- # beginners (85)
- # calva (21)
- # cider (6)
- # clara (9)
- # clj-http (1)
- # clj-kondo (35)
- # cljfx (6)
- # clojure (91)
- # clojure-australia (11)
- # clojure-europe (23)
- # clojure-italy (7)
- # clojure-losangeles (2)
- # clojure-nl (27)
- # clojure-uk (107)
- # clojurescript (4)
- # community-development (1)
- # cursive (69)
- # emacs (12)
- # fulcro (29)
- # graalvm (25)
- # honeysql (10)
- # hugsql (3)
- # integrant (13)
- # jobs (4)
- # kaocha (3)
- # keechma (1)
- # lambdaisland (3)
- # leiningen (2)
- # meander (17)
- # mount (3)
- # observability (1)
- # off-topic (86)
- # pathom (3)
- # polylith (2)
- # practicalli (14)
- # reitit (14)
- # shadow-cljs (61)
- # startup-in-a-month (1)
- # tools-deps (9)
- # vim (54)
- # xtdb (16)
I’m running Intellij 2019.3.5 and I’ve just upgraded Cursive to 1.10.1-eap2-2019.3. I’m not able to get a clojure repl running. The error message I’m getting is
I’ve tried deleting the .idea folder and the *.iml file and reimporting the project with no success. Any ideas what might be causing this? I’m on a Mac running 10.14.6 (Mojave) and my project is configured for Java SDK 13. Thanks!
Error running 'CLJ Local': class clojure.lang.PersistentVector cannot be cast to class [Lcom.intellij.openapi.actionSystem.AnAction; (clojure.lang.PersistentVector is in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @7e26aea8; [Lcom.intellij.openapi.actionSystem.AnAction; is in unnamed module of loader com.intellij.util.lang.UrlClassLoader @5419f379)
Could you check your log (Help->Show log in Finder/Explorer) and see if the full stacktrace appears there?
Here’s a stacktrace that corresponds to the time I got the error:
2021-02-10 17:22:44,449 [ 652404] WARN - .impl.LineStatusTrackerManager - Tracker is being held on dispose by [email protected]; file: /REPL.clj 2021-02-10 17:22:44,456 [ 652411] ERROR - api.util.objectTree.ObjectTree - Editor of class com.intellij.openapi.editor.impl.EditorImpl hasn't been released: com.intellij.openapi.util.TraceableDisposable.ObjectNotDisposedException: See stack trace responsible for creation of unreleased object below at com.intellij.openapi.editor.impl.EditorImpl.<init>(EditorImpl.java:148) at com.intellij.openapi.editor.impl.EditorFactoryImpl.createEditor(EditorFactoryImpl.java:200) at com.intellij.openapi.editor.impl.EditorFactoryImpl.createEditor(EditorFactoryImpl.java:160) at cursive.repl.ClojureConsole.<init>(ClojureConsole.java:89) at cursive.repl.toolwindow$create_repl_ui.invokeStatic(toolwindow.clj:593) at cursive.repl.toolwindow$create_repl_ui.invoke(toolwindow.clj:586) at cursive.repl.toolwindow$create_new_repl$reify__12629.run(toolwindow.clj:761) at com.intellij.openapi.application.impl.ApplicationImpl.invokeAndWait(ApplicationImpl.java:519) at com.intellij.openapi.application.impl.ApplicationImpl.invokeAndWait(ApplicationImpl.java:532) at cursive.repl.toolwindow$create_new_repl.invokeStatic(toolwindow.clj:760) at cursive.repl.toolwindow$create_new_repl.invoke(toolwindow.clj:747) at cursive.repl.process_runner$run_nrepl_server.invokeStatic(process_runner.clj:163) at cursive.repl.process_runner$run_nrepl_server.invoke(process_runner.clj:148) at cursive.repl.process_runner$execute.invokeStatic(process_runner.clj:239) at cursive.repl.process_runner$execute.invoke(process_runner.clj:234) at clojure.lang.Var.invoke(Var.java:406) at cursive.api.DelayedFn.invoke(DelayedFn.java:51) at cursive.repl.runner.LocalConfiguration$getRunProfileState$2.execute(ReplRunConfigurations.kt:484) at com.intellij.execution.impl.DefaultJavaProgramRunner.doExecute(DefaultJavaProgramRunner.java:111) at com.intellij.execution.runners.GenericProgramRunner$execute$$inlined$runProfileStarter$1.executeAsync(GenericProgramRunner.kt:56) at com.intellij.execution.runners.GenericProgramRunnerKt$startRunProfile$$inlined$runProfileStarter$1.executeAsync(GenericProgramRunner.kt:56) at com.intellij.execution.impl.ExecutionManagerKtImpl$startRunProfile$startRunnable$1.run(ExecutionManagerKtImpl.kt:66) at com.intellij.openapi.application.TransactionGuardImpl.runSyncTransaction(TransactionGuardImpl.java:83) at com.intellij.openapi.application.TransactionGuardImpl.lambda$submitTransaction$1(TransactionGuardImpl.java:107) at com.intellij.openapi.application.TransactionGuardImpl.submitTransaction(TransactionGuardImpl.java:116) at com.intellij.openapi.application.TransactionGuard.submitTransaction(TransactionGuard.java:121) at com.intellij.execution.impl.ExecutionManagerKtImpl$startRunProfile$2.run(ExecutionManagerKtImpl.kt:121) at com.intellij.execution.impl.ExecutionManagerImpl.compileAndRun(ExecutionManagerImpl.java:279) at com.intellij.execution.impl.ExecutionManagerKtImpl.startRunProfile(ExecutionManagerKtImpl.kt:121) at com.intellij.execution.runners.GenericProgramRunnerKt.startRunProfile(GenericProgramRunner.kt:50) at com.intellij.execution.runners.GenericProgramRunner.execute(GenericProgramRunner.kt:17) at cursive.runner.DeferredRunner.access$execute$s-282919921(Deferred.kt:59) at cursive.runner.DeferredRunner$execute$1$run$1.run(Deferred.kt:92) at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:309) at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.doRun(LaterInvocator.java:441) at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:424) at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:407) at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:908) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:781) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:424) at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:698) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:423) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90) 2021-02-10 17:22:44,457 [ 652412] ERROR - api.util.objectTree.ObjectTree - IntelliJ IDEA 2019.3.5 Build #IC-193.7288.26 2021-02-10 17:22:44,457 [ 652412] ERROR - api.util.objectTree.ObjectTree - JDK: 11.0.6; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o 2021-02-10 17:22:44,457 [ 652412] ERROR - api.util.objectTree.ObjectTree - OS: Mac OS X
I don’t think that’s the same problem unfortunately. That one looks like some kind of object leak, probably caused by the original problem.
I’ll take a look higher up in the log… stand by. Many thanks for your help BTW Colin! 🙂
Maybe this is it?
2021-02-10 17:12:14,903 [ 22858] INFO - il.indexing.FileBasedIndexImpl - Rebuild requested for index ClojureSymbolMeta java.lang.Throwable at com.intellij.util.indexing.FileBasedIndex.requestRebuild(FileBasedIndex.java:64) at cursive.stubs.ReplStubsNotifications$createNotification$1$whenDone$1.run(Stubs.kt:240) at cursive.stubs$generate_stubs$fn__15817$process__15818.invoke(stubs.clj:250) at cursive.stubs$generate_stubs$fn__15817.invoke(stubs.clj:325) at cursive.task$backgroundable$reify__15747.run(task.clj:12) at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:888) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:163) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:585) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:531) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:59) at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:150) at com.intellij.openapi.progress.impl.CoreProgressManager$4.lambda$run$0(CoreProgressManager.java:402) at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:221) at com.intellij.openapi.progress.impl.CoreProgressManager$4.run(CoreProgressManager.java:402) at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:238) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834) 2021-02-10 17:12:14,962 [ 22917] INFO - il.indexing.FileBasedIndexImpl - scheduleIndexRebuild, reason: checkRebuild
No, that one’s not actually an error, just IntelliJ noting that something requested that the indexes get rebuilt. That’s an unusual thing to do (Cursive is one of the few plugins with a real use-case for it) so they log it to be sure.
Ok, please let me know if I can provide any other info (would you like the full log via email?).
Yeah, if you could send it that might be helpful - <mailto:[email protected]|[email protected]>
Ok, will do.
Also, could you send a screenshot of the run config you’re trying to run in case there’s anything unusual about it?
One other thing to note is that git in Intellij seems to be in a weird state. It’s not seeing my
develop branch even though it’s fine on disk. I’m not sure if that would have any impact on running a repl but thought I would mention it.
Hi @U0567Q30W - I was going to delete the Intellij Preferences and Caches folders and start from a clean slate but wanted to check with you before doing that in case you needed anything from my config to track down this bug.
My IntelliJ also shows wrong branch but otherwise works OK.
After deleting the project directory and re-cloning from github, all my git branches are back. Unfortunately, I’m still getting the same error on launching the repl. FWIW - here’s a link to the project: https://github.com/aeberts/fulcro-rad-demo
@U0G3C3USJ Thanks for the project link, I’ll try to reproduce with that.
BTW - I just tried setting my project SDK to 1.8 and I’m getting the same error. (it was Java 13).
@U0567Q30W More testing feedback: I tried running a remote nrepl server in the project with nrepl-0.8.3 and then connecting remotely to it and I’m getting the same error.
@U0G3C3USJ Just to let you know I’ve managed to reproduce this with your setup, so I’ll be able to debug it - thanks!
Ugh, I had also planned to improve the error logging, but that’s handled by IntelliJ. What it does is write out the exception at debug level, so you have to know which logger to set to debug level to see it. Yuk.
Ok, this will be fixed for the next build. This bug only affected 2019.3, which I guess is why no-one else hit it (an IntelliJ API accepts a List in recent versions, but in 2019.3 was a varargs call).
@U0567Q30W thanks for the update and good news regarding that bug!
Pathom - particularly Pathom3's smart maps - is figuring larger in my codebase. I'd love cursive to understand keywords that are "defined" as part of a Pathom resolver so I can hotlink to their definition
hello, Pathom author here 🙂 @U0567Q30W you can find docs for this here: https://pathom3.wsscode.com/docs/resolvers
altough, I believe if we want to index resolvers we have a few open questions about what and how much to index
I think would be interest to index the presence of an attribute in an "output" as a definition of it (an output attribute means that this resolver can expose this data, this is what I think makes most sense to navigate to)
this would have to be open to many definition points, as the same attribute may appear in many different resolvers
the output may be explicit (::pco/output key in the configuration map of the resolver), or implicit (in case the last statement of the resolver definition is a map, this is documented on that same page)
Thanks @U066U8JQJ for stepping in 🙂 I agree that mapping an attribute to the resolvers that produce it would be a great first step
I manually segregate the
requires into 3 sections - 1.
clojure.*, 2. third-party lib namespaces, 3. app namespaces. I maintain alphabetic order within each section, again manually. Any pointers to automate this would be great.
I was also irritated by this so I created a https://plugins.jetbrains.com/plugin/13222-clojure-namespace-sort The insides of the plugin aren’t great, but it works decently
@UGMAVSMUM I tried installing your plugin but it doesn’t turn up in plugin search. I’m on Ultimate 2020.3
I personally use https://github.com/greglook/cljstyle which orders them for me, as a file watcher task
yeah sure, one second...
it's the closest I've been able to get to prettier in js
I hope I explained how to set it up with that screenshot but let me know if not, I've been meaning to write a blog post on it really
it doesn't seem to for me, no
Oh this looks interesting @UC3B7UJF2! Thanks for sharing!
@UGMAVSMUM i was able to use your plugin 🙂 do you have it on github?
@U0AD3JSHL Yep, https://github.com/mustangJaro/antandreAny improvements to it would be fantastic! I know it’s not written the best
This is going to seem silly, but how does Tony kill to the end of the form here? https://youtu.be/3dZK5seIaVI?t=1238
Something like kill-sexp-to-end perhaps, let me check which exact paraedit command it is
Kill and Kill Sexp both work. Now how to paste like he did…
Thank you @U052521SY
Yeah, I can’t figure out how to paste it into place like he does in that example. If any one can point me to the action…
@U3FKR3KDF I’m pretty sure that Tony is using a vim plugin with Intellij (I believe it’s IdeaVim) so it could be a vim command that he’s using…
@U0G3C3USJ I’m using IdeaVim. I’ll ask Tony directly.
Straight up Kill should indeed work, and just normal paste should paste it back wherever you want it.
(however as reported in another thread, in the very latest build Kill seems to only kill to the end of the line, not the end of the form as it should).