This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-02-19
Channels
- # announcements (10)
- # aws (3)
- # aws-lambda (1)
- # babashka (24)
- # beginners (57)
- # boot (5)
- # calva (20)
- # chlorine-clover (3)
- # cider (14)
- # clj-kondo (37)
- # clojars (17)
- # clojure (200)
- # clojure-dev (40)
- # clojure-europe (9)
- # clojure-france (7)
- # clojure-gamedev (5)
- # clojure-hungary (4)
- # clojure-italy (8)
- # clojure-losangeles (2)
- # clojure-nl (9)
- # clojure-uk (97)
- # clojurebridge (1)
- # clojured (3)
- # clojuredesign-podcast (23)
- # clojurescript (13)
- # code-reviews (2)
- # component (22)
- # core-typed (7)
- # cursive (64)
- # datascript (12)
- # datomic (60)
- # emacs (6)
- # fulcro (54)
- # graalvm (11)
- # graphql (3)
- # hoplon (25)
- # jobs (1)
- # joker (85)
- # juxt (5)
- # kaocha (10)
- # klipse (8)
- # malli (2)
- # off-topic (36)
- # parinfer (1)
- # pathom (1)
- # re-frame (9)
- # reagent (4)
- # reitit (1)
- # remote-jobs (1)
- # shadow-cljs (24)
- # spacemacs (1)
- # sql (39)
- # tools-deps (10)
- # tree-sitter (18)
- # xtdb (18)
Hi guys, I just installed IntelliJ/Cursive on Windows (latest version), and when trying to "use tools.deps directly", the version is <none>, and after clicking on "Refresh" I'm finding this file inside .m2/repository/org/clojure/tools.deps/alpha, "resolver-status.properties", with the following content: #NOTE: This is an Aether internal implementation file, its format can be changed without prior notice. #Wed Feb 19 01:27:46 BRT 2020 maven-metadata-central.xml/@default-central-http\:<//repo1.maven.org/maven2/.lastUpdated=1582086466312> maven-metadata-central.xml.error=Could not transfer metadata org.clojure\:tools.deps.alpha/maven-metadata.xml from/to central (http\:<//repo1.maven.org/maven2/>)\: status code\: 501, reason phrase\: HTTPS Required (501) Anyone has any ideas on how to fix this? Tried manually adding a profile with https repository in settings.xml without luck. š
Hi @U7JCZJR0W, this is a bug which is fixed in the latest EAP build but not in stable releases yet. Oops, I see you just found the solution š
(i don't actually want it gone, but i want to figure out a visual indicator that doesn't murder my eyes when im using a library that cursive can't resolve any symbols in)
Just checking, do you know about customising symbol resolution? https://cursive-ide.com/userguide/macros.html. I know it doesnāt always work, but it might help if youāre not aware of it.
Is it possible to render a link (to a project-file) in the cursive terminal, just like the links in stacktrace?
Not that Iām aware of, but I donāt actually use the terminal much. There may be something that IntelliJ does which allows that.
I meant the repl, sorry for the confusion š there's a plug-in for the terminal, haven't tried it yer
I downgraded Cursive to eap4 and most REPL related problems went away. It seems that some UI glue is not quite right in the latest version.
@U0KD0N5T5 Which REPL related problems were you seeing in the new version?
I can try to hunt for exceptions but I tried to send most of them via autosend on IDE error. One other frequent is:
idea.log:java.lang.AbstractMethodError: Receiver class cursive.repl.toolwindow$repl_listener$reify__11844 does not define or inherit an implementation of the resolved method 'abstract void selectionChanged(com.intellij.ui.content.ContentManagerEvent)' of interface com.intellij.ui.content.ContentManagerListener.
idea.log: at cursive.repl.toolwindow$repl_listener$reify__11844.projectClosing(toolwindow.clj:218)
idea.log: at cursive.repl.ClojureConsole.<init>(ClojureConsole.java:89)
idea.log: at cursive.repl.toolwindow$create_repl_ui.invokeStatic(toolwindow.clj:593)
idea.log: at cursive.repl.toolwindow$create_repl_ui.invoke(toolwindow.clj:586)
idea.log: at cursive.repl.toolwindow$create_new_repl$reify__12085.run(toolwindow.clj:758)
idea.log: at cursive.repl.toolwindow$create_new_repl.invokeStatic(toolwindow.clj:757)
idea.log: at cursive.repl.toolwindow$create_new_repl.invoke(toolwindow.clj:745)
idea.log: at cursive.repl.process_runner$run_clojure_main.invokeStatic(process_runner.clj:205)
idea.log: at cursive.repl.process_runner$run_clojure_main.invoke(process_runner.clj:193)
idea.log: at cursive.repl.process_runner$execute.invokeStatic(process_runner.clj:234)
idea.log: at cursive.repl.process_runner$execute.invoke(process_runner.clj:230)
idea.log: at cursive.api.DelayedFn.invoke(DelayedFn.java:51)
idea.log: at cursive.repl.runner.LocalConfiguration$getRunProfileState$2.execute(ReplRunConfigurations.kt:366)
idea.log: at cursive.runner.DeferredRunner.access$execute$s-282919921(Deferred.kt:58)
idea.log: at cursive.runner.DeferredRunner$execute$1$run$1.run(Deferred.kt:91)
idea.log:2020-02-18 14:26:43,007 [ 5678] INFO - #cursive.repl.IdeReplServer - IDE REPL server bound to localhost/127.0.0.1 on 36941
idea.log:com.intellij.diagnostic.PluginException: Cannot create listener cursive.notifications.LeiningenProjectNotificationProvider$Listener [Plugin: com.cursiveclojure.cursive]
idea.log: at cursive.build.BuildSystemProjectsManager$onChange$1.run(BuildSystemManager.kt:101)
Ok, thanks. Some of those are definitely fixed in the next build, but the AbstractMethodError I canāt reprodce, itās a really weird one.
I'll try to focus on reproducing some of those problems if they persist. But it looked like most of them are just manifestations of a different error
No, theyāre mostly manifestations of the fact that Iāve been trying to fix up a lot of uses of deprecated APIs to get 2020.1 working properly, and itās made the release pretty complicated. But I do wonder if the AbstractMethodError one is some kind of build error since I canāt come up with a plausible explanation for it.
I can't think of the AbstractMethod issue is a standalone thing. It always popped up after a different error. But it could be some kind of code branch that is mostly unused.
@cfleming so Iāve most often gotten that error in the JVM when the classpath has two of the āsame thingā on it, which can result in an ordering issue: if the right one is found by the classloader first, then it works. Otherwise, it fails because the other version doesnāt have some method that is defined on the interface. Say Interface A is in some updated lib and you have two things that implement the interface, but one was compiled against the old version (where some method in A didnāt exist) and an instance of that gets into the code flow. Some new code based on the new version of A that has the method tries to call it and you get that error.
@U0CKQ19AQ Thanks, Iād considered something like that, but I canāt come up with a plausible way it could happen. My go-to reason for things like this is some AOT crud lying around, but I always do a clean build as part of my release process. I also canāt figure out why I can never reproduce it.
2020-02-19 12:00:11,864 [ 261079] ERROR - roject.impl.ProjectManagerImpl - Plugin to blame: Cursive version: 1.9.1-eap6-2019.3
2020-02-19 12:00:11,964 [ 261179] ERROR - .impl.MessageBusConnectionImpl - Method cursive/repl/toolwindow$repl_listener$reify__11845.contentRemoved(Lcom/intellij/ui/content/ContentManagerEvent;)V is abstract
java.lang.AbstractMethodError: Method cursive/repl/toolwindow$repl_listener$reify__11845.contentRemoved(Lcom/intellij/ui/content/ContentManagerEvent;)V is abstract
at cursive.repl.toolwindow$repl_listener$reify__11845.contentRemoved(toolwindow.clj)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.intellij.util.EventDispatcher.dispatchVoidMethod(EventDispatcher.java:130)
at com.intellij.util.EventDispatcher.access$000(EventDispatcher.java:24)
at com.intellij.util.EventDispatcher$1.invoke(EventDispatcher.java:88)
at com.sun.proxy.$Proxy105.contentRemoved(Unknown Source)
at com.intellij.ui.content.impl.ContentManagerImpl.fireContentRemoved(ContentManagerImpl.java:551)
at com.intellij.ui.content.impl.ContentManagerImpl.doRemoveContent(ContentManagerImpl.java:229)
at com.intellij.ui.content.impl.ContentManagerImpl.removeContent(ContentManagerImpl.java:171)
at com.intellij.ui.content.impl.ContentManagerImpl.removeContent(ContentManagerImpl.java:164)
at cursive.repl.toolwindow$repl_listener$reify__11845.projectClosing(toolwindow.clj:218)
at com.intellij.openapi.project.impl.ProjectManagerImpl$1.projectClosing(ProjectManagerImpl.java:126)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.intellij.util.messages.impl.MessageBusImpl.invokeListener(MessageBusImpl.java:513)
at com.intellij.util.messages.impl.MessageBusConnectionImpl.deliverMessage(MessageBusConnectionImpl.java:138)
at com.intellij.util.messages.impl.MessageBusImpl.doPumpMessages(MessageBusImpl.java:438)
at com.intellij.util.messages.impl.MessageBusImpl.pumpWaitingBuses(MessageBusImpl.java:398)
at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(MessageBusImpl.java:388)
at com.intellij.util.messages.impl.MessageBusImpl.sendMessage(MessageBusImpl.java:372)
at com.intellij.util.messages.impl.MessageBusImpl.lambda$createTopicHandler$1(MessageBusImpl.java:241)
at com.sun.proxy.$Proxy80.projectClosing(Unknown Source)
at com.intellij.openapi.project.impl.ProjectManagerImpl.fireProjectClosing(ProjectManagerImpl.java:789)
at com.intellij.openapi.project.impl.ProjectManagerImpl.closeProject(ProjectManagerImpl.java:748)
at com.intellij.openapi.project.impl.ProjectManagerImpl.closeAndDisposeAllProjects(ProjectManagerImpl.java:688)
at com.intellij.openapi.application.impl.ApplicationImpl.disposeSelf(ApplicationImpl.java:170)
at com.intellij.openapi.application.impl.ApplicationImpl.doExit(ApplicationImpl.java:655)
at com.intellij.openapi.application.impl.ApplicationImpl.exit(ApplicationImpl.java:628)
at com.intellij.openapi.application.impl.ApplicationImpl.exit(ApplicationImpl.java:617)
at com.intellij.openapi.application.impl.ApplicationImpl.exit(ApplicationImpl.java:613)
at com.intellij.openapi.application.impl.ApplicationImpl.exit(ApplicationImpl.java:584)
at com.intellij.openapi.application.impl.ApplicationImpl.exit(ApplicationImpl.java:579)
at com.intellij.ui.mac.MacOSApplicationProvider$Worker.lambda$null$3(MacOSApplicationProvider.java:72)
at com.intellij.ui.mac.MacOSApplicationProvider$Worker.lambda$submit$7(MacOSApplicationProvider.java:162)
at com.intellij.openapi.application.TransactionGuardImpl.runSyncTransaction(TransactionGuardImpl.java:83)
at com.intellij.openapi.application.TransactionGuardImpl.lambda$pollQueueLater$0(TransactionGuardImpl.java:68)
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)
/Applications/IntelliJ -Djava.awt.headless=true -Dmaven.defaultProjectBuilder.disableGlobalModelCache=true -Xmx768m -Didea.maven.embedder.version=3.6.1 -Dmaven.ext.class.path=/Applications/IntelliJ -Dfile.encoding=UTF-8 -classpath /Applications/IntelliJ org.jetbrains.idea.maven.server.RemoteMavenServer36
@U0CKQ19AQ Thanks, Iām going to download the archive of the version youāre using and make sure thereās nothing funky about it.
Hmm, interesting idea. Cursive mostly knows which REPL is being used as which, so in theory that should be possible. It might change how the history has to be stored though, which might be tricky. Iāll investigate.
On a similar note, is it possible to have separate repls visible at the same time?
This is a bit tricky from a UI point of view. I actually investigated using the debugger UI framework for this which might be possible. Apparently there are improvements coming in upcoming IntelliJ versions which might make this much easier.
Oh good!
Yeah, that would be my main use case - I don't think I would ever use 2 of the same kind.
What about an integrated one in the same pane? I was considering one in which you could switch the input pane to go to one or the other, and the output would be marked as coming from one or the other.
That would probably be fine - though it might get weird when looking through the history. My ideal (I think) setup would be to have one monitor with all my CLJ stuff and the other with all the CLJS - so I could have REBL, CLJ editor windows, and the CLJ repl on one side and the browser, CLJS editor windows, and CLJS repl on the other.
Yeah, too bad the repl window doesn't work the same as the other ones - everything else works great. Most of the time the only thing I'm checking for on the repl output is to make sure that I'm not getting an error, which would be totally fine with the combined output.
So, I have actually considered allowing that. The issue is what to do when you use āSend x to REPLā¦ā type actions. How do you determine which is the REPL you want to send it to? I guess I could just prompt if it were ambiguous, but that would get annoying pretty quickly.
Would it be possible to have .cljs files send to only repl windows defined as cljs? For my workflow it would probably be fine if it sent to all repls at the same time (if that's possible), but I don't know if that would cause massive issues otherwise. Not knowing what is possible in intellij, maybe the prompt could occur when you try to split the repl windows, and then have an active window for each type of file.
@U086D6TBN I donāt think Iāve had any situations where it would be an issue if it sent cljc forms to both repls, and it would be great to be able to compare the two at the same time. Maybe have a toggle on the repl window so that it could be turned off?
i tried to use terminal tabs in the editor area, but when i switch to another editor, i can't switch back to the terminal afterwards. all references are just gone to it. (i set Editor Tabs / Tabs limit to 1, though)
@U054BUGT4 i was just exploring how these things are done in emacs/cider. it takes forever to learn that ecosystem, but it also teaches u about the possible workflows. maybe some of those ideas could be funnelled back to cursive too...
That would be great. It definitely seems like there are a lot of intellij specific tricks though.
Yes, I think that CIDER does that, if you have a combined CLJ/CLJS REPL open it will send files and forms to the corresponding REPL, and CLJC to both.
Iām definitely very open to hearing about good ideas Cursive should take inspiration from.
Does anyone have any thoughts on using LSP vs File Watchers for incorporating clj-kondo? https://github.com/borkdude/clj-kondo/blob/master/doc/editor-integration.md#intellij-idea
I tried both approaches and LSP might be faster. However, you need to download the kondo LSP-jar release manually to keep kondo updated. File watcher can be used with the one distributed via brew. And the LSP-plugin from Iltellij marketplace was broken and I had to install it from GitHub. So, both are ok options, I settled with LSP š
I just updated to 1.9.1-eap6-2019.3 and now Iām getting this error when I try to run a remote repl that connects to my shadow-cljs server:
12:58 PM Error running 'nREPL 9000': Receiver class cursive.repl.toolwindow$repl_listener$reify__11845 does not define or inherit an implementation of the resolved method 'abstract void contentAdded(com.intellij.ui.content.ContentManagerEvent)' of interface com.intellij.ui.content.ContentManagerListener.
Downgraded to 1.9.0-2019.3 and it works