This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-12-01
Channels
- # adventofcode (93)
- # announcements (44)
- # asami (23)
- # aws (1)
- # babashka (48)
- # beginners (112)
- # calva (26)
- # cider (57)
- # clj-kondo (17)
- # cljfx (5)
- # cljs-dev (21)
- # clojure (124)
- # clojure-europe (19)
- # clojure-hungary (40)
- # clojure-nl (3)
- # clojure-spec (7)
- # clojure-uk (3)
- # clojurescript (3)
- # cursive (81)
- # datalog (11)
- # events (21)
- # exercism (1)
- # fulcro (37)
- # graalvm (1)
- # introduce-yourself (8)
- # jobs (1)
- # lsp (1)
- # malli (5)
- # membrane-term (17)
- # minecraft (3)
- # nextjournal (5)
- # off-topic (14)
- # other-lisps (14)
- # polylith (58)
- # reagent (16)
- # reclojure (3)
- # reitit (6)
- # remote-jobs (1)
- # shadow-cljs (55)
- # spacemacs (15)
- # testing (2)
- # tools-build (7)
- # tools-deps (191)
I don’t do anything special for shadow. I start shadow from the terminal, then I connect to it’s nrepl from intellij run configuration. I choose the module in the connection settings. Once I’m connected, I (shadow/repl :main) or whatever your config is.
Sounds to me like your intellij module isn’t being correctly configured for your deps.edn setup.
Is there a module in your project settings?
can you be more specific when you say "a module"?
or phrase it a different way, i'm not sure exactly what that means.
and yep, my plan was to start it from my terminal and then connect to it.
Here is what my run config looks like
and my settings...
I assume the issue is in my "config" (first pic)
if i click run i get a "repl run configuration is incorrect - no module selected"
shadow-cljs - nREPL server started on port 43885
IntelliJ Modules
each of those is a deps.edn on it’s own.
What do you have in your modules list under Project Structure
looking. I think i see the issue though, i didn't select the project root maybe.
here are my modules with the correct project root selected...
Hard to tell your setup from that. Can you screenshot your project structure window?
What does you run/debug configurations look like ? i have "remote repl": • connection type: nrepl • connect to server (bc i started shadow locally) w/ host->locahost port->port started for nrepl server by shadow. context module->name of project root.
If i run the "run" then it says its trying to connect to a remote server and just hangs
Have you started shadow?
shadow-cljs - HTTP server available at
shadow-cljs - HTTP server available at
shadow-cljs - server version: 2.15.10 running at
shadow-cljs - nREPL server started on port 43885
shadow-cljs - watching build :dev
[:dev] Configuring build.
[:dev] Compiling ...
[:dev] Build completed. (1512 files, 1 compiled, 0 warnings, 9.10s)
maybe its working right now. i think i ran into this before were i expected a repl to pop up after i hit the run button and its like hiding
thanks!!!
it's telling me i can't send cljs forms to a clj repl. Which is fair, but shadow started the nrepl server at the port i selected for my remote repl. And when i started the repl i selected "cljs" though it immeditly changes to clj.
ok i had to run (shadow/repl <my build>)
yes that’s right
i should be get auto complete on a ns i require into another right e.g re-frame/*
with * as my cursor should show everything in the re-frame ns. i don't and they are highlited telling me that that "re-frame" cannot be resolved.
Yeah you should. That’s normally the Module not correctly imported or created.
Is this module setup by intelliji on load? like why wouldn't it be created correctly?
Impossible to tell from here.
One thing you could do is delete all the .idea and *.iml files and recreate your project.
ill try that.
that fixed it.
Great.
Interesting. auto completion works, but it's inconstant. Like 1/4 times it won't give them on the same symbol.
but thats enough diving into this for today 🙂
i swear to god, everytime i try out a different editor then emacs bc something isn't working (auto completion) it scares emacs into working
There is no silver bullet unfortunately. Every few months I find myself flirting with a different editor because Cursive doesn’t have exactly what I want, but I always end up returning (happily I might add)
Yep. The autocomplete thing is an utter mystery in this project. From file to file in the same folder it stops working
What i need to do is see if it fails the same way across a couple tools.
I'm going to find a compiler bug or something. My claim to fame.
files with the letter "f" don't work on saturdays when there is a high tide.
We can’t send email more than 500 miles: https://www.ibiblio.org/harris/500milemail.html
Hey guys, I wonder why load file to REPL
doesn’t eval the content? What is equivalent of cider-eval-buffer
in Cursive?
Why do you think that load file
doesn’t eval the content? It basically does a load-file
(with some extra complication).
Was your hello
command typed into the REPL editor? If so, that’s because the REPL namespace is not the same as the namespace of the file. If you do (test/hello "Cursive")
instead, that should work.
Do you have Preferences | Languages & Frameworks | Clojure | REPL Options | Evaluate forms in REPL namespace selected?
1. Yes, it’s marked
2. Loading src/flx/awspricy.clj... loaded
and then *ns*
=> #object[clojure.lang.Namespace 0x52bc6236 "user"]
Ok, that’s the problem. That checkbox is not checked by default. What that means is that if you send forms from an editor to the REPL, they will be evaluated in the current REPL ns rather than the ns of the file from which they came. So, when you load your file it’s loaded into the test
ns as you would expect. Then when you evaluate (hello "Cursive")
from your file, that happens in the user
ns instead of your test
ns, which is why hello
can’t be found.

hmm... I seem to be having some issues with deps.edn in cursive today. Has anyone seen a stack trace like this before?
java.lang.RuntimeException: Could not create shim
at cursive.shim.ShimProvider.getShim(Shim.kt:148)
at cursive.shim.ShimProvider.withShim(Shim.kt:115)
at cursive.deps.DepsProjectDetails.doGetDetails(Project.kt:176)
at cursive.deps.DepsProjectDetails.doGetDetails(Project.kt:87)
at cursive.build.BuildSystemProjectDetails.getProjectDetails(BuildSystem.kt:45)
at cursive.build.BuildSystemProjectsManager.reimportAllProjects$lambda-3$lambda-2(BuildSystemManager.kt:149)
at cursive.build.BuildSystemUtil$runTask$1$1.run(BuildSystemUtil.kt:83)
at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:436)
...
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: Syntax error compiling at (cursive/deps/command.clj:28:40).
at clojure.lang.Compiler.analyze(Compiler.java:6808)
...
at clojure.lang.Var.invoke(Var.java:384)
at org.projectodd.shimdandy.impl.ClojureRuntimeShimImpl.require(ClojureRuntimeShimImpl.java:73)
at cursive.shim.ShimBootstrap.apply(ShimBootstrap.java:29)
at cursive.shim.Shim.createShimProvider$lambda-1(Shim.kt:80)
at cursive.shim.ShimProvider$createShim$1.invoke(Shim.kt:155)
at cursive.shim.ShimProvider$createShim$1.invoke(Shim.kt:153)
at cursive.application.ApplicationKt.onPooledThread$lambda-2(Application.kt:16)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:263)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
... 7 more
Caused by: java.lang.RuntimeException: No such var: deps/make-classpath-map
at clojure.lang.Util.runtimeException(Util.java:221)
at clojure.lang.Compiler.resolveIn(Compiler.java:7388)
at clojure.lang.Compiler.resolve(Compiler.java:7358)
at clojure.lang.Compiler.analyzeSymbol(Compiler.java:7319)
at clojure.lang.Compiler.analyze(Compiler.java:6768)
... 110 more
Fyi, if you hit the lightning icon and “create a text snippet”, it doesn't spam the channel quite as bad
Thanks @U064X3EF3, I wasn't expecting the stack trace to be so huge when I pasted it in! I'll move it into this thread to avoid the spam in the channel.
I have submitted Exception report #21858 @U0567Q30W
I've tried re-opening the project against a clean check-out of the code and it now fails as soon as I try to "add as a clojure deps project"
@UCQV87CN7 Does upgrading deps fix that? IIRC that was me trying to fix a deprecation warning in deps, and that var might not exist in older versions.
it is true that it does not exist in (much) older versions
hmm, it is possible that my clojure cli is a little out of date...
clj --version
Clojure CLI version 1.10.3.855
upgraded to 1.10.3.1040
and that seems to have immediately fixed things -- thanks a lot \o/
I wonder if it is worth getting Cursive to pop up a balloon in IntelliJ warning if the clojure cli version is out of date?
It actually does do that, but I made that change without considering that this might be a problem. I’ll figure out what the new minimum version is and update that.