This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-03-15
Channels
- # aws (25)
- # babashka (11)
- # beginners (24)
- # calva (18)
- # clj-kondo (6)
- # cljdoc (1)
- # clojure (48)
- # clojure-europe (3)
- # clojure-houston (1)
- # clojure-uk (22)
- # clojuredesign-podcast (8)
- # clojurescript (9)
- # cursive (8)
- # dirac (6)
- # duct (19)
- # fulcro (17)
- # hoplon (29)
- # mount (3)
- # off-topic (24)
- # pathom (6)
- # re-frame (6)
- # shadow-cljs (5)
- # spacemacs (5)
- # sql (10)
- # tools-deps (7)
- # vim (2)
Hello. Is there a way for calva to run and connect to cljs repl in deps.edn setup? I have this below setup
{:deps {}
:paths ["src"]
:aliases
{:nrepl {:extra-deps {nrepl/nrepl {:mvn/version "0.6.0"}
cider/piggieback {:mvn/version "0.4.2"}}
:main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.piggieback/wrap-cljs-repl]"]}}}
Running in terminal clj -R:nrepl
works.
But how to run it in vscode calvaI;m getting this error, when sending evaluation to repl (ctrl + alt + c, ctrl + alt + e)
@jaime.sangcap, Use Jack-in and choose the Clojure CLI
option. Do not choose an alias.
It doesn't load the file automatically. There is a command for that. (And can be configured to do it on save as well.)
I think what I was missing is step 1 & 2 From calva docs
A Clojure nREPL connection needs to be established. We've covered that above. Calva makes an nREPL session clone to use for the ClojureScript REPL and then:
1. Your ClojureScript app needs to be compiled.
2. Your ClojureScript app needs to be started.
3. The Clojure nREPL session needs to be promoted to a ClojureScript nREPL session. (This is what piggieback helps with.)
Are you getting it to work, @jaime.sangcap? I'm off to bed now, but will check for questions first thing tomorrow and also there are others in this channel who are in a more awake TZ. 😃
@U0ETXRFEW thanks 😄 I still can't get it to work. I'm still confused how repl works. I'm doing some reading now in calva docs and clojurescript. I will get back here if I failed to make it work 😆
It could be something with your project. Is Leiningen an opion for you? It's easier to set up a project from scratch there. Then we can isolate the problem easier when we try wit tools.deps.
Actually I'm doing it only for learning purpose. My goal is to have minimum files required to run a cljs repl using clojure cli (deps.edn).
Right now I only have one core.cljs
file and deps.edn
When using lein, there are a lot of files and dependencies involved and I'm confused what does what.
I'm not sure what the minimal setup is. You'll need something that compiles cljs. And Calva needs an nrepl server.
oh alright, seems not for beginners, I'll park this for now. I guess I'll just use shadow-cljs. Thanks a lot 😄
Shadow is awesome. I don't think it is super complicated. You could ask on Clojureverse. What is the minimal http://tools.deps, cljs setup with support for Cider (and therefore Calva). I am also curious now. 😎
😁 I uploaded a repo https://github.com/jaimesangcap/etudes-clojurescript That repo contains only core.cljs & deps.edn (thinking its the minimum required). I'm trying to connect with repl and evaluate form using calva. But getting some errors (see readme)