Fork me on GitHub
#cider
<
2018-04-02
>
weslord00:04:09

When I use cider-jack-in in emacs, I get this message instead,

;; Connected to nREPL server - 
;; CIDER 0.16.0 (Riga), nREPL 0.2.13
;; Clojure 1.8.0, Java 9.0.1
...which is what I'm expecting with lein repl

weslord00:04:29

First off: Is this expectation even correct?

pauld00:04:01

@fedreg Are you using spacemacs main repo or develop? I'm using develop and I can't get the new clojure.repl to work via cider-jack-in because sayid middleware is not compatible and breaks things. I disabled the package and it works. Just putting that out there in case your problem is related.

fedreg03:04:42

@pauld I use the main repo; but this problem was not with spacemacs. Cider works great with spacemacs. I'm having this issue with vanilla emacs.

bozhidar04:04:08

> I think there’s some hold up around cljs stuff?

bozhidar04:04:18

@dominicm I don’t remember something like this. There was just a conversation as to whether orchard should know about piggieback, and I believe it shouldn’t as that’s a definitely an nREPL concern.

dominicm05:04:42

I only had a cursory look

bozhidar04:04:27

@weslord No, the expectation is not correct. CIDER’s REPL prints a custom message, that you would not get using lein repl. Btw, modifying the profiles is not needed at all these days.

weslord08:04:10

Thanks. I'm setting up vim-fireplace, and since it "mostly works" without cider-nrepl, I can't tell if it is using it or not.

weslord08:04:54

I should probably just take a "no news is good news" approach to this for now and stop looking for problems.

bozhidar04:04:10

> @fedreg Are you using spacemacs main repo or develop? I’m using develop and I can’t get the new clojure.repl to work via cider-jack-in because sayid middleware is not compatible and breaks things. I disabled the package and it works. Just putting that out there in case your problem is related.

bozhidar04:04:33

@pauld What exactly is the problem with sayid? Is it out-of-date or something?

bozhidar04:04:03

> @pauld I use the main repo; but this problem was not with spacemacs. Cider works great with spacemacs. I’m having this issue with vanilla emacs.

bozhidar04:04:54

@fedreg What problems exactly are you having? I’m using vanilla Emacs and everything’s just fine (as it should be 🙂 ).

bozhidar05:04:22

Interesting. I’d suggest consulting the troubloshooting section of the manual to track down what’s going wrong.

fedreg05:04:52

@bozhidar Thanks! Turned off evil-mode and is working fine now. There must be some sort of binding conflict. Will have to investigate a bit. Thanks for the help (and the debugger!!)!

bozhidar06:04:29

You’re welcome! 👍

bozhidar06:04:04

That’s one of the tricky parts about editors like Emacs and Vim - there are often weird interactions between some of the packages people might be using. 🙂

bozhidar07:04:32

@thheller Can you remind me what was the form needed to start a cljs REPL? (I’m too lazy to go over the manual) 🙂 I want to add this soon, so I can wrap the phase one of proper shadow-cljs support.

thheller09:04:26

@bozhidar its not a single form since it depends on which REPL we are talking about. (shadow.cljs.devtools.api/node-repl) or (../browser-repl) or (../nrepl-select <the-build-id-keyword>). didn't add the no-arg nrepl-select yet.

bozhidar10:04:33

So I should add 3 options - Shadow Node, Shadow Browser and Shadow ?, right?

bozhidar10:04:22

Regarding the nrepl-select version I’m planning to just ask users to provide the build themselves before starting it, which is a reasonable compromise imo.

bozhidar10:04:23

I’m just a bit confused why some repls don’t require a build id and so do. I guess I really need to educate myself better on the subject.

pauld11:04:57

@bozhidar This is what I get in spacemacs develop branch when I try to jack into a clojure.repl project with sayid as part of the middleware installed:

pauld11:04:53

Jack in works fine with a lein project.

dpsutton14:04:33

can someone try to reproduce this issue? https://github.com/clojure-emacs/cider/issues/2254 It's very simple. Just turn on logging and cider-jack-in. I'm getting some strange output in the logging buffer and trying to determine if its something weird on my end or in the message logging

bozhidar14:04:21

@pauld I see your problem is coming from clj-refactor.el, not from sayid.

bozhidar14:04:58

I guess spacemacs enables clj-refactor.el out of the box or something like this. Most likely you’re running a version of refactor-nrepl, that’s not compatible with cider-nrepl.

bozhidar15:04:55

@dpsutton I can reproduce this as well.

bozhidar15:04:16

Seems something is fucked up with the way we generate the “init-debugger” request.

bozhidar15:04:13

(defun cider--debug-init-connection ()
  "Initialize a connection with the cider.debug middleware."
  (cider-nrepl-send-request
   (nconc '("op" "init-debugger")
          (when cider-debug-print-level
            `("print-level" ,cider-debug-print-level))
          (when cider-debug-print-length
            `("print-length" ,cider-debug-print-length)))
   #'cider--debug-response-handler))

dpsutton16:04:41

Thanks for confirming. I looked into it and the messages coming into the log printer looked right. I think it's strictly on the logging side

bozhidar16:04:39

I fail to see how this message is different from any other message, though. Why aren’t we getting such problems elsewhere?

dpsutton16:04:02

No idea. But stepping through, the msg parameter did not have the duplicates as far as I could tell

bozhidar19:04:32

When stepping didn’t you also see what was going on in the logging function?

rymndhng20:04:00

i really like the :style/indent for making marco indent work for the devs in my team. I recalled watching "Clojure: The Bad Parts" about not having a standard for indentation -- was there a discussion of this at some point (with the other tools out there, i.e. cljfmt), i'd love to have this work automatically for all-the-tools, since some folks at work don't use cider/emacs

dpsutton20:04:51

Tried stepping through one morning but it ran into errors relating to writing into a read only buffer.

dpsutton20:04:06

Gonna take the time to capture the message and write a proper test

bozhidar20:04:39

@rymndhng I wish more people saw the benefit in having an unified indentation standard. Maybe the down the road. 🙂