This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-06-08
Channels
- # atlanta-clojurians (1)
- # beginners (116)
- # cider (70)
- # cljs-dev (11)
- # cljsrn (2)
- # clojure (218)
- # clojure-italy (7)
- # clojure-nl (14)
- # clojure-nlp (11)
- # clojure-spec (8)
- # clojure-uk (113)
- # clojurescript (86)
- # core-async (14)
- # cursive (24)
- # datomic (64)
- # duct (1)
- # emacs (3)
- # fulcro (20)
- # graphql (10)
- # jobs-rus (1)
- # london-clojurians (1)
- # luminus (1)
- # nyc (1)
- # off-topic (24)
- # onyx (1)
- # parinfer (1)
- # pedestal (14)
- # portkey (11)
- # re-frame (36)
- # reagent (9)
- # reitit (5)
- # ring (1)
- # shadow-cljs (197)
- # spacemacs (21)
- # specter (22)
- # sql (15)
- # tools-deps (5)
Because at the moment I am working on the server side only - node - in cljs
@richiardiandrea There’s nothing like this in CIDER, just the tools.namespace reload. Obviously it won’t be hard to add it, though.
after upgrading to emacs 26.1 I've started to get following errors when trying to connect to nrepl (or doing cider-jack-in).
error in process filter: queue-enqueue: Wrong type argument: queue, [cl-struct-queue nil nil]
error in process filter: Wrong type argument: queue, [cl-struct-queue nil nil]
Packages were recompiled after upgrade, cider version: cider-20180607.2155$ lein repl
nREPL server started on port 58957 on host 127.0.0.1 -
REPL-y 0.3.7, nREPL 0.2.12
Clojure 1.9.0
Java HotSpot(TM) 64-Bit Server VM 1.8.0_66-b18
and from emacs (cider-jack-in)
Starting nREPL server via lein update-in :dependencies conj \[org.clojure/tools.nrepl\ \"0.2.13\"\ \:exclusions\ \[org.clojure/clojure\]\] -- update-in :plugins conj \[refactor-nrepl\ \"2.4.0-SNAPSHOT\"\] -- update-in :plugins conj \[cider/cider-nrepl\ \"0.18.0-SNAPSHOT\"\] -- repl :headless :host ::...
nREPL server started on 57781
[nREPL] Establishing direct connection to localhost:57781 ...
[nREPL] Direct connection to localhost:57781 established
error in process filter: queue-enqueue: Wrong type argument: queue, [cl-struct-queue nil nil]
error in process filter: Wrong type argument: queue, [cl-struct-queue nil nil]
error in process filter: nrepl-send-sync-request: Sync nREPL request timed out (op clone id 1)
error in process filter: Sync nREPL request timed out (op clone id 1)
@tsulej ah that. It's really annoying with these cl errors, that so many emacs developers use these cl- functions but don't realize that it's already required elsewhere in their emacs environment. I bet if you add (require 'cl)
at the beginning of your init.el, it will fix.
in the scratch buffer you can of course do M-. on the symbol queue-enqueue and see if it's there
checking, meanwhile debugger output
Debugger entered--Lisp error: (wrong-type-argument queue [cl-struct-queue nil nil])
signal(wrong-type-argument (queue [cl-struct-queue nil nil]))
queue-enqueue([cl-struct-queue nil nil] "d2:id1:111:new-session36:a4c59ff8-14e5-4341-8fdd-6f8313c718867:session36:5906ee68-0733-4842-85f4-075c6f1136b46:statusl4:doneee")
nrepl-client-filter(#<process nrepl-connection<1>> "d2:id1:111:new-session36:a4c59ff8-14e5-4341-8fdd-6f8313c718867:session36:5906ee68-0733-4842-85f4-075c6f1136b46:statusl4:doneee")
accept-process-output(nil 0.01)
nrepl-send-sync-request(("op" "clone" "id" "1") #<buffer *cider-repl localhost*<2>> nil nil)
nrepl-sync-request:clone(#<buffer *cider-repl localhost*<2>>)
nrepl--init-client-sessions(#<process nrepl-connection<1>>)
nrepl-start-client-process("localhost" 58957)
cider-connect("localhost" 58957)
funcall-interactively(cider-connect "localhost" 58957)
#<subr call-interactively>(cider-connect nil nil)
apply(#<subr call-interactively> cider-connect (nil nil))
call-interactively@ido-cr+-record-current-command(#<subr call-interactively> cider-connect nil nil)
apply(call-interactively@ido-cr+-record-current-command #<subr call-interactively> (cider-connect nil nil))
call-interactively(cider-connect nil nil)
command-execute(cider-connect)
it's most likely this here https://github.com/clojure-emacs/cider/blob/dd836340ba9571b24d9bbccae2336c3f0c22116b/nrepl-client.el#L433-L436
since string-q is nil in your error, you may want to resolve the symbol queue-create
(setq string-q (queue-create)))
probably also cl- function that needs to be aliased...looks like process-get
returns nil
here https://github.com/clojure-emacs/cider/blob/master/nrepl-client.el#L471
way deeper than I imagined first. No idea what's happening, why would the process filter even be evaluated if there's no data. I also have newest cider and emacs 26. No take that back, I'm on 25.3... I pass the ball.
I forced compilation of all packages. But probably deleting is better option here. I'll let you know in a minute.
that was it... recompilation wasn't enough. Thank you for your time. No need to test @bozhidar
Cider gurus, I am trying to implement the :reload
feature and it kind of freezes the UI with cider-interactive-eval
the first time. I wonder if cider contains already some sort of async eval mechanism of some sort
(in the meantime, exploring the code base)
i believe it is by default "async". check nrepl-send-request
versus nrepl-send-sync-request
well, it seems all the commands call cider-interactive-eval
so will use that for now
i traced it for a second and it seemed like cider-interactive-eval uses the async version
(not for long because 26.1 introduced threads!)
Has anyone here gotten shadow-cljs to auto-connect to the correct repl once things are up and running? I find I have to run (shadow.cljs.devtools.api/repl :app)
manually in the clojure repl.
shouldn't be difficult to add something like
(cider-interactive-eval
(format "(shadow.cljs.devtools.api/nrepl-select %s)" build-id))
into the pipeline, I guess it's not there, I also have to choose the repl. But I also start a shadow-cljs server, it's probably tricky for cider to know if the nrepl is connecting to a watch or server.there should be a command for launching the shadow things, maybe something is missing
cider actually auto detects if there's shadow-cljs.edn in cider-jack-in, it's very nice!
here: https://github.com/clojure-emacs/cider/blob/4c593d099825a8e9f6319903fcbe5bcbc15662cf/cider.el#L680
so it's still that strange bug lurking around, with cider + shadow, sometimes things have to be said twice, or press enter sometimes to get the cljs connection running
hi, I'm just getting acquainted w/cider, is there a way to make it pretty print my maps by default?
say I am bootstrapping a CLJS manually
do I need to set the connection type to cljs
for the buffer manually as well?
@dpsutton thank you! check that
cool thank you!
shadow REPL is a bit flaky, trying it now for the first time
better to start a server at the terminal and connect to it
@dpsutton actually...if you do cider-connect-clojurescript
the cider-repl-type
var seems to be set for you
even if it is a clj repl not yet "upgraded"
no ok, once you upgrade you lose it
crap, I am lost in tooling land 😄
i think there are some bugs out there that are resetting the repl back to clj. i think a state message comes back after the upgrade and says clj so it resets the repl back to clj
yeah it seems like it
because:
ELISP> cider-repl-type
"cljs"
<-- sent evaluation ->
ELISP> cider-repl-type
"clj"
maybe the repl type should not be changed at all after the fact?
but I don't know maybe it is like this for a reason
ELISP> (setq cider-repl-type "cljs")
"cljs"
ELISP> cider-repl-type
"cljs"
<-- sent cljs evaluation ->
ELISP> cider-repl-type
"clj"
ELISP>
it seems to me the behavior was there to manage when you do :repl/quit
and demote
because it seems on :repl/quit
a changed-namespaces
is sent back
@dpsutton open a PR in order to discuss the behavior https://github.com/clojure-emacs/cider/pull/2316
it would be great if the patch can be tested for a little bit in order to see what the consequences are
a simple one 😄
completions in shadow does not work am I right?
or do I need the cider-nrepl
middleware with it?