This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-03-05
Channels
- # beginners (229)
- # cider (54)
- # cljs-dev (187)
- # cljsrn (1)
- # clojure (187)
- # clojure-dev (5)
- # clojure-italy (31)
- # clojure-losangeles (1)
- # clojure-russia (3)
- # clojure-spec (76)
- # clojure-uk (29)
- # clojurescript (94)
- # cursive (18)
- # datascript (8)
- # datomic (26)
- # docker (6)
- # emacs (19)
- # figwheel (6)
- # fulcro (41)
- # garden (1)
- # graphql (1)
- # hoplon (33)
- # jobs (1)
- # jobs-discuss (1)
- # lein-figwheel (14)
- # leiningen (7)
- # nrepl (10)
- # nyc (1)
- # off-topic (2)
- # onyx (2)
- # parinfer (25)
- # portkey (6)
- # powderkeg (1)
- # protorepl (1)
- # re-frame (14)
- # reagent (14)
- # shadow-cljs (31)
- # spacemacs (3)
- # test-check (33)
- # uncomplicate (1)
- # unrepl (40)
- # vim (5)
- # yada (16)
One more step towards a better cljs experience with cider https://github.com/clojure-emacs/cider/commit/7d91a6d8c3b0c8b709465b43420d795e27829db4
"cider-find-reusable-repl-buffer: Symbol’s function definition is void: cider--select-zombie-buffer" anyone else getting this from cider-jack-in?
Ops, now I noticed what I’ve done. I’ve wrapped more expressions in one let
then I meant to. Sorry about this!
thank you, @bozhidar. I hard reset to 6c16e8af62bf6101dbe3a15919ff8d6ab4f0f977
for now because I'm in the office, but I'll try the fix as soon as I get home.
I keep telling myself not to put new features hastily together, at some point I should also start listening to myself.
no worries, I have no problem testing bleeding edge CIDER and using Git for cases such as this. Which, by the way, happen rarely 😉
gonna have to investigate this one. the figwheel check fails but when i remove that check the build succeeds
hmm. i think we've been sending invalid code fora while. check out cider
repl-set-initial-ns`:
(let* ((response (nrepl-send-sync-request
(lax-plist-put (nrepl--eval-request "(str *ns*))")
"inhibit-cider-middleware" "true")
(cider-current-connection)))
(initial-ns (or (read (nrepl-dict-get response "value"))
"user")))
(cider-set-buffer-ns initial-ns))
(-->
id "4"
op "eval"
session "1a7c6cb2-64c9-4a10-b598-f6a153feb31c"
time-stamp "2018-03-05 09:18:33.480233757"
code "(str *ns*))"
inhibit-cider-middleware "true"
)
(<--
id "4"
session "1a7c6cb2-64c9-4a10-b598-f6a153feb31c"
time-stamp "2018-03-05 09:18:33.527592981"
err "RuntimeException Unmatched delimiter: ) clojure.lang.Util.runtimeException (Util.java:221)
"
)
ok. the cljs checking is fundamentally broken in its current state. (find-ns 'figwheel-sidecar.repl-api)
fails but that doesn't mean that figwheel isn't on the classpath. the figwheel startup is to require it which does succeed.
(->> (all-ns)
(map str)
(filter (fn [ns] (clojure.string/starts-with? ns "figwheel"))))
but then (do (require 'figwheel-sidecar.repl-api) (figwheel-sidecar.repl-api/start-figwheel!) (figwheel-sidecar.repl-api/cljs-repl))
succeedsI don’t have a comment on improving find-ns
, but I do have a question that is in that same domain.
I have in my emacs setup
;; Set to the required key in cider.el const `cider--cljs-repl-types`
(setq cider-cljs-lein-repl
"(do (require 'figwheel-sidecar.repl-api) (figwheel-sidecar.repl-api/start-figwheel!) (figwheel-sidecar.repl-api/cljs-repl))")
Is this the way that you are supposed to setup the preferred cljs repl (for jack in/create sibling)?
It seems weird that I just copy/pasted that string from cider.el I’m pretty sure I must have missed something
it would be nice to let you just (setq cider-default-cljs-repl-type "figwheel")
and let it look up the required form
mikerod, if you C-h C-f
to find function and look at cider-create-sibling-cljs-repl
you'll see where it checks to see if you have already set a repl invocation
yeah. it's been like that for a while. when setting it i always have to go spelunking in the code to see what the form is
should have an option for specify the type and use CIDER's string for it, specify your own invoke form, or the select that bohzidar added recently (which is really nice)
@dpsutton I actually see this Cider issue https://github.com/clojure-emacs/cider/issues/2202 that I think covers this topic we discussed earlier around setting the awkward cider-cljs-lein-repl
var
add a comment on there. "i'd like to be able to set the type to figwheel and it know the invocation required for that rather than setting it to the actual invocation" but otherwise you are right. but that's a perfect spot for that feedback
and if you are jacing in with clojurescript you're probably gonna run into the issue of CIDER incorrectly telling you your project is not setup for clojurescript
My recent pattern has been cider-jack-in
(for clj), then cider-create-sibling-cljs-repl
I don’t remember trying more direct cljs jack in before, but perhaps that’s why I ended up down this path
I think a long while ago I used to have issues with it. So I just started a habit of starting a headless lein nrepl server and connecting via cider-connect
for a long time. One day I finally decided to give it a shot again with jack in and it is nice
give it a whirl and file any issues you run into. if you run into any i bet they are easily solved and it gets better for everyone
I’d like to start paying a bit closer attention to cider internals (and nrepl middleware) to be able to contribute back better. Especially since there are frequent request here for more contribution.
check out http://hackingcider.com for some info on the internals, readthedocs and always ask in here!
no biggie. should come naturally a bit after looking at some of the code around your changes
I’m not completely ignorant with elisp either. I’ve done some research before. Just not super proficient. I can still track through cider code more or less I believe. Thanks for the advice and link too.
I’ll be the first to admit not being super proficient with elisp. But one can still get things done. The PR feedback and guidance from the project goes a long way.