This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # babashka (53)
- # beginners (158)
- # calva (25)
- # cider (21)
- # clara (1)
- # clj-kondo (12)
- # cljsrn (6)
- # clojure (94)
- # clojure-australia (2)
- # clojure-bay-area (6)
- # clojure-europe (40)
- # clojure-nl (10)
- # clojure-spec (16)
- # clojure-uk (18)
- # clojurescript (95)
- # cursive (14)
- # data-science (1)
- # datascript (6)
- # datomic (18)
- # depstar (2)
- # duct (36)
- # emacs (15)
- # events (4)
- # fulcro (16)
- # graalvm (10)
- # helix (25)
- # honeysql (6)
- # jackdaw (4)
- # jobs (2)
- # leiningen (24)
- # lsp (4)
- # malli (10)
- # off-topic (3)
- # pathom (3)
- # polylith (19)
- # practicalli (4)
- # prelude (1)
- # re-frame (6)
- # reagent (13)
- # reitit (3)
- # remote-jobs (10)
- # ring (12)
- # ring-swagger (2)
- # shadow-cljs (54)
- # testing (17)
- # tools-deps (10)
- # xtdb (14)
Hi everyone, I have a question about something I read in the docs
How do I check for cider-middleware? I’m not jacking in from Calva straight, I use the
Most importantly, make sure you have cider/cider-nrepl as a dependency, and cider.nrepl/cider-middleware as middleware loaded in your REPL
Connect to a running REPL server in the projectcommand
@hewrin you can use the command Copy Jack-in Command to Clipboard to see how Calva starts the REPL. Then you can either start it in a similar way (I would, if the setup allows) or place those dependencies in your project.
I got this from the Copy Jack-in Command
This means I have cider-middleware right?
lein update-in :dependencies conj '[nrepl,"0.8.3"] '-- update-in :plugins conj '[cider/cider-nrepl,"0.25.10"] '-- update-in '[:repl-options,:nrepl-middleware] 'conj '["cider.nrepl/cider-middleware"] '-- with-profile +dev repl :headless
Do you have any reasons to suspect you don’t have it? (Just curious about what got you to ask this.)
Earlier debugging didn’t seem to work for me, but I think its because I ran the code that called the function I was trying to instrument from the browser and not sending it to the REPL, does the debugger only work when using it with the REPL?
I’m not sure. But I maybe you are running into the problem addressed here? https://clojurians.slack.com/archives/C0617A8PQ/p1618228902247400
@hewrin See this issue for info related to your question, and a possible solution. https://github.com/BetterThanTomorrow/calva/issues/1049
I’m helping out a colleague getting started with Calva. The project uses Leiningen and shadow-cljs. I run “Connect to a Running REPL Server in the project”, start the web app, open it in the browser to establish the JS runtime, then run
(shadow.cljs.devtools.api/repl :app). Then, if I try evaluating something from a ClojureScript buffer, nothing happens. I think Calva does not recognize that I’m in a ClojureScript buffer or some reason or something. What am I doing wrong?
The status bar says “nREPL <lightning emoji> clj”, not “cljs”, even though I have a ClojureScript file open.
@flowthing When you connect, do you get to select a project type? Calva needs to know that cljs is involved.
Yeah, I chose Leiningen, because if I choose Leiningen + shadow-cljs, I get this:
; Execution error (ExceptionInfo) at shadow.cljs.devtools.server.runtime/get-instance! (runtime.clj:11). shadow-cljs has not been started yet! In embedded mode you need to call (shadow.cljs.devtools.server/start!) to start it.
I do understand what that error means, but I'm not sure how to set up Calva such that I don't get that error and I get a ClojureScript REPL.
I suppose I could set up the project differently somehow, but I'd like it if I didn't have to do that.
I haven’t seen that error before… Full stack projects can be a bit troublesome to get going. I can think of two things to try: 1. For full stack: Use the lein-shadow plugin and then jack-in/connect to that project type. 2. ClojureScript only: Configure shadow-cljs to use leiningen for dependencies and select the shadow-cljs project type.
If you have some time right now, @flowthing, I can make a video call and we might be able to figure something out via screen sharing.
Thanks for the offer! Can’t do it right now (and I probably wouldn’t be allowed to), but I’ll give the pointers you gave me a try. Thanks!
Maybe it can help creating a Luminus project configured for Leinginen + shadow-cljs and see how it is wired. Last time I checked that, it worked well with Calva. There’s a video and some instructions here: https://calva.io/luminus/
I think i've asked this before, but just to check this again: isn't there any way to only show the evaluation results on the
output.calva-repl window ?
Wait. Maybe there is now. You can create custom command snippets that evaluate the current or top level forms, and bind those commands to the keys you want.