This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-11-29
Channels
- # adventofcode (7)
- # announcements (11)
- # beginners (76)
- # boot (3)
- # calva (139)
- # cider (24)
- # clara (2)
- # cljdoc (11)
- # cljs-dev (90)
- # cljsjs (1)
- # cljsrn (3)
- # clojure (98)
- # clojure-austin (2)
- # clojure-brasil (2)
- # clojure-dev (16)
- # clojure-europe (3)
- # clojure-italy (55)
- # clojure-nl (37)
- # clojure-sweden (11)
- # clojure-uk (40)
- # clojurebridge (1)
- # clojurescript (107)
- # core-logic (10)
- # cursive (34)
- # data-science (9)
- # datascript (19)
- # datomic (48)
- # emacs (6)
- # figwheel (13)
- # figwheel-main (3)
- # fulcro (67)
- # jobs (1)
- # juxt (4)
- # lumo (8)
- # mount (1)
- # off-topic (29)
- # onyx (1)
- # reagent (7)
- # reitit (3)
- # ring-swagger (5)
- # shadow-cljs (39)
- # spacemacs (5)
- # tools-deps (1)
Hey guys, is it possible to jump to a function’s definition when using Calva with clojurescript?
Hello, @mateus.pimentel.w, yes, as long as it is a Figwheel project you can. Something is preventing it to work in shadow-cljs, I don’t know what.
So, what I have found things can be a bit sensitive to the order they are referenced. And that error message looks like it could be about that.
Which might not matter if you are using lein, but anyway, try putting [org.clojure/tools.nrepl "0.2.13"]
between piggieback and sidecar.
If you start it using lein repl
then leiningen will spit a .nrepl-ort
file out which Calva then uses to automatically fill in the port.
Then you start Figwheel and the cljs repl like so:
$ (require '[figwheel-sidecar.repl-api :as figwheel])(figwheel/start-figwheel!)(figwheel/cljs-repl))
i mean, it started, but i’m actually trying to figure out what happened, because other thing is appearing now
I think so. We could also try putting all this in your ~/.lein/profiles.clj
instead, mostly to see if starts working then.
Also try with this in your profiles.clj
:
:repl {:plugins [[cider/cider-nrepl "0.18.0"]
[lein-figwheel "0.5.17"]]
:dependencies [[cider/piggieback "0.3.10"]
[org.clojure/tools.nrepl "0.2.13"]
[figwheel-sidecar "0.5.17"]]
:repl-options {:nrepl-middleware [cider.piggieback/wrap-cljs-repl]}}
i started a new project with that lein template ( +cider ) to see if i can make the extension to work this way
i made this last one with lein new re-frame re-frame-app +garden +less +10x +cider +test +re-com +re-pressed +breaking-point +routes
I am sorry about how hard it is to get this working. It is on my todo-list to do what Cider does and help with injecting the dependencies that Calva needs.
There is one thing we haven’t tried yet, though, I think. I doubt it will work any better, but at least we should give it a shot.
It’s to put the :repl
map in your profiles.clj
. That’s where I have these deps on my machine.
That’s actually where there could lurk something funny. What is in your profiles.clj
now?
Put this in there:
{:repl {:plugins [[cider/cider-nrepl "0.18.0"]
[lein-figwheel "0.5.17"]]
:dependencies [[cider/piggieback "0.3.10"]
[org.clojure/tools.nrepl "0.2.13"]
[figwheel-sidecar "0.5.17"]]
:repl-options {:nrepl-middleware [cider.piggieback/wrap-cljs-repl]}}}
(require '[figwheel-sidecar.repl-api :as figwheel])(figwheel/start-figwheel!)(figwheel/cljs-repl))
I am trying it on my regular machine first. It is downloading a lot of stuff so that template has been updated.
Yes, my old test projects work. I’ll push a working one to github so you can test cloning that one.
It is just a test project I am using when hacking on Calva. But it starts without any compliants.
So, if you make yours look like so https://clojurians.slack.com/archives/CBE668G4R/p1543512148405300