This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-08-11
Channels
- # aleph (7)
- # announcements (5)
- # beginners (58)
- # calva (20)
- # cider (10)
- # clj-kondo (4)
- # cljfx (5)
- # cljsrn (7)
- # clojure (29)
- # clojure-europe (11)
- # clojure-mexico (1)
- # clojure-norway (26)
- # clojure-uk (9)
- # clojurescript (1)
- # cursive (31)
- # datahike (22)
- # datomic (12)
- # duct (3)
- # fulcro (28)
- # helix (35)
- # hyperfiddle (28)
- # lsp (4)
- # malli (8)
- # midje (3)
- # music (2)
- # nbb (9)
- # nrepl (20)
- # off-topic (36)
- # polylith (3)
- # shadow-cljs (47)
- # sql (2)
- # testing (7)
- # vim (17)
- # xtdb (7)
Hey @cfleming
Firstly, thank you for creating such an awesome plugin in Cursive.
I'm developing a project Goose: https://github.com/nilenso/goose
Apart from src
& test
folders, I've created a separate folder for load-testing called perf
I've added perf
folder to Source root as can be found in goose.iml
However, upon restart, IntelliJ won't compile with a warning & I've to re-add perf
to Source root every time.
> File load.clj is not under a source root
Any idea why IntelliJ does that & how to fix this?
Thanks for the kind words! It looks like goose is a deps project, so you probably want: https://cursive-ide.com/userguide/deps.html#working-with-aliases
@cfleming I added all aliases in the Clojure Deps toolwindow, added load.clj
as source root & restarted IntelliJ.
Still I'm facing same issue.
@U03HVBGMRJ5 When you select the aliases in the toolwindow, you don’t have to restart IntelliJ, just refresh the project from the toolwindow. So, could you open the toolwindow and refresh the project now?
Once you’ve done that, does the perf
folder appear as a source root? It should be the same colour in the project view as the src
folder.
> just refresh the project from the toolwindow
Doing this doesn't fix the issue
> Does the perf
folder appear as a source root? It should be the same colour in the project view as the src
folder
This happens only after I click on Add Source root
from IntelliJ, not by adding the alias from Deps toolwindow
One thing I’ve just noticed, shouldn’t the key in the :perf
alias be :extra-paths
instead of :paths
in Goose’s deps.edn
?
@cfleming modifying Clojure Deps tool window & s/:paths/:extra-paths/
fixed the issue. cc @U38004EG7
I had modified :perf
alias in the past to see if :paths
worked.
Thanks a lot :hugging_face:
Hi all. Is there a way to see REPLs side by side, instead of overlapping tabs? I would want to see Clojure and ClojureScript REPLs at the same time if possible.
So, there isn’t at the moment, but JetBrains have recently added the ability to do that in toolwindows and I’m planning to add it for REPLs. There are some open UX questions about how it should work. Currently, sending forms to the REPL send to the currently selected REPL, which is harder to determine if there are multiple REPLs visible at once.
Another option is to allow the user to open the REPL in a normal editor rather than a toolwindow, then you could just arrange them using the normal editor arrangement commands. It still has the same problem of identifying where to send forms etc.
Yes, sending automatically to the proper REPL would further accelerate development. Sending based on to what module the file belongs could be a nice first guess. Doesn't work for multiple REPLs running from the same module of course. In that case, the last one might be a good guess. I'm not sure if many people use to have several REPLs for the same module.
Well, having one for clj and another for cljs would be a common use case. When sending forms from clj or cljs the correct one could be chosen based on the file type, but cljc is trickier.
Any news on this ticket?
https://github.com/cursive-ide/cursive/issues/1918
There is some trick to run midje facts
in cursive REPL?
I’m very unlikely to support Midje. It has been effectively dead for ages and is a tangled mass of macros. Sorry 😞
@cfleming What is “Run ‘x-test’ in REPL” doing? I was curious if I could get a macro that evaluates to a deftest to be evaluated similarly.
I think you can run Midje tests by just using deftest directly and having Midje assertions in the tests.
After upgrading to JDK17 I get these errors after each expression in REPL:
Error updating class definitions:
Execution error (NullPointerException) at java.util.concurrent.ConcurrentHashMap/get (ConcurrentHashMap.java:936).
Cannot invoke "Object.hashCode()" because "key" is null
Are you using tools.namespace? I sometimes see this when reloading namespaces. I have never investigated but it seems to be some kind of race condition and the error has not impacted my development.
I don’t get it when running JDK 8 or 14, but always when using 17, so that looks a bit less than a race condition then
we've been using Java 17 at work shortly after it was released and have never seen this error. is it possible for you to post the full stack trace?
I cannot, because it doesn’t happen on the same thread
if I say *e it just returns nil
Not sure if this was ever solved, I've just started getting this error as well appearing...
Connecting to remote nREPL server...
Clojure 1.11.1
Error updating class definitions:
Execution error (NullPointerException) at java.util.concurrent.ConcurrentHashMap/get (ConcurrentHashMap.java:936).
Cannot invoke "Object.hashCode()" because "key" is null
*e
=> nil
Error updating class definitions:
Execution error (NullPointerException) at java.util.concurrent.ConcurrentHashMap/get (ConcurrentHashMap.java:936).
Cannot invoke "Object.hashCode()" because "key" is null
So this is connecting to a shadow-cljs nrepl running:
openjdk version "19.0.1" 2022-10-18
OpenJDK Runtime Environment Homebrew (build 19.0.1)
OpenJDK 64-Bit Server VM Homebrew (build 19.0.1, mixed mode, sharing)
im on M1 macOS 13.0.1 (22A400) /nix/store/280df465g5isik8ljjnc8c31ncq2s4is-zulu17.34.19-ca-jdk-17.0.3/bin/java
anyone else got these?
Not sure if this was ever solved, I've just started getting this error as well appearing...
Connecting to remote nREPL server...
Clojure 1.11.1
Error updating class definitions:
Execution error (NullPointerException) at java.util.concurrent.ConcurrentHashMap/get (ConcurrentHashMap.java:936).
Cannot invoke "Object.hashCode()" because "key" is null
*e
=> nil
Error updating class definitions:
Execution error (NullPointerException) at java.util.concurrent.ConcurrentHashMap/get (ConcurrentHashMap.java:936).
Cannot invoke "Object.hashCode()" because "key" is null
So this is connecting to a shadow-cljs nrepl running:
openjdk version "19.0.1" 2022-10-18
OpenJDK Runtime Environment Homebrew (build 19.0.1)
OpenJDK 64-Bit Server VM Homebrew (build 19.0.1, mixed mode, sharing)