Fork me on GitHub
#cider
<
2018-02-02
>
bozhidar08:02:30

@shooodooken The way to interact with the code being debugged is usually by injecting some values from the debugger itself.

bozhidar08:02:59

Every time you change the code definition the debugger no longer can map what the current code to what was actually instrumented by it.

bozhidar08:02:49

Take a look at the manual for more details http://cider.readthedocs.io/en/latest/debugging/

dominicm11:02:53

@bozhidar My colleague just used my snippet to cider-connect to an nrepl. 2 things of note: - deps.edn needs adding to the project root finder - Someone needs to write a jack-in builder for clj in elisp

bozhidar11:02:06

@dominicm I know. That’s trivial to do, I just didn’t have time to address it recently.

bozhidar11:02:16

I did open a ticket, so I won’t forget about it.

dominicm11:02:49

ah, wasn't sure there was a ticket, wanted to make sure.

dominicm11:02:05

But yeah, really excited that it worked for him (when I copied the jack in command from vim 😈 )

dominicm11:02:58

Oh, something else @bozhidar, he had to add an explicit dependency on tools.nrepl to the project. I thought that cider-nrepl had one, so I didn't mention it anywhere.

bozhidar11:02:02

@dominicm tools.nrepl or orchard? There’s an explicit dependency to tools.nrepl, but for some reason I needed to add a dependency to orchard, even though it should have been inlined.

dominicm11:02:34

@bozhidar tools.nrepl, 100%. It couldn't require clojure.tools.nrepl.server (or similar)

dominicm11:02:50

No explicit orchard dependency was needed for us.

dominicm11:02:59

(maybe orchard brought in tools.nrepl?!)

bozhidar11:02:27

That’s our only non-inlined dependency.

dominicm12:02:21

Exactly, so I was really confused by it. Could be t.d.a bug I guess?

bozhidar12:02:23

I don’t know. Sounds like a potential bug.

dominicm12:02:53

❯ clj -Sdeps '{:deps {cider/cider-nrepl {:mvn/version "0.17.0-SNAPSHOT"} }}' -Spath
src:/home/dominic/.m2/repository/org/clojure/clojure/1.9.0/clojure-1.9.0.jar:/home/dominic/.m2/repository/cider/cider-nrepl/0.17.0-SNAPSHOT/cider-nrepl-0.17.0-SNAPSHOT.jar:/home/dominic/.m2/repository/org/clojure/spec.alpha/0.1.143/spec.alpha-0.1.143.jar:/home/dominic/.m2/repository/org/clojure/core.specs.alpha/0.1.24/core.specs.alpha-0.1.24.jar
Definitely missing.

bozhidar12:02:47

I wonder how something like this can happen…

dominicm14:02:20

Alex is looking into it 🙂

andrzejsliwa19:02:22

it it's only me? or my emacs configuration? or formatting is broken?

andrzejsliwa19:02:58

hmm looks like problem on my side, I just opened same file in cursive and looks correct

twashing19:02:38

Oye, currently, whenever I include cider-nrepl (`:plugins [[cider/cider-nrepl "0.17.0-SNAPSHOT"]`), lein gives me a TLS warning.

$ lein repl
Tried to use insecure HTTP repository without TLS.
This is almost certainly a mistake; however in rare cases where it's
intentional please see `lein help faq` for details.

twashing19:02:40

I totally see cider on clojars, so I don’t understand the error. https://clojars.org/repo/cider/cider-nrepl/0.17.0-SNAPSHOT/

twashing19:02:36

@gonewest818 Ah ok. I have an HTTP repository configured. But cider-nrepl comes from clojars. So does that qualify as a bug?

gonewest81819:02:18

No, you can use https to access clojars. In Leiningen the url would be .

twashing19:02:50

Ok, explicitly setting “https://clojars.org/repo” as a repo, does the trick. Cheers!

gonewest81819:02:51

Although, I don’t understand what happened in your case. If I do this:

gonewest81819:02:14

$ lein new foo
$ cd foo
$ vi project.clj
   # (in vi, insert ":plugins [[cider/cider-nrepl "0.17.0-SNAPSHOT"]]" and save)
$ lein repl
Retrieving cider/cider-nrepl/0.17.0-SNAPSHOT/cider-nrepl-0.17.0-20180131.161649-9.pom from clojars
Retrieving cider/cider-nrepl/0.17.0-SNAPSHOT/cider-nrepl-0.17.0-20180131.161649-9.jar from clojars
nREPL server started on port 53908 on host 127.0.0.1 - 
REPL-y 0.3.7, nREPL 0.2.12
Clojure 1.8.0
Java HotSpot(TM) 64-Bit Server VM 1.8.0_112-b16
    Docs: (doc function-name-here)
          (find-doc "part-of-name-here")
  Source: (source function-name-here)
 Javadoc: (javadoc java-object-or-class-here)
    Exit: Control+D or (exit) or (quit)
 Results: Stored in vars *1, *2, *3, an exception in *e

user=> Bye for now!

gonewest81819:02:19

and I didn’t have to do anything with repo settings. That was leiningen 2.8.1.

ag19:02:57

I don't like that cider functions open things in other-window all the time. jack-in, cider-scratch, etc. I want them to open in the current window. Is there a straightforward way of setting that?

ag19:02:24

like a var or something?

twashing19:02:58

@gonewest818 Right. That was also my confusion. Maybe it’s because I had those profile settings in my ~/lein/profiles.clj ? I dunno.

gonewest81820:02:43

@twashing let me try that.

ag20:02:20

hey hi Tim!

twashing20:02:41

I think the other-window configuration happens on a case by case basis. So window behaviour on repl connection, is described here: https://cider.readthedocs.io/en/latest/using_the_repl/#repl-configuration

ag20:02:40

I'll check it out

twashing20:02:20

Maybe type M-x customize-group cider and see what options you have.

gonewest81820:02:40

@twashing with the following inserted into ~/.lein/profiles.clj

gonewest81820:02:45

;;; note: CIDER injects its own dependencies these days
 :repl
 {:plugins
  [[cider/cider-nrepl "0.17.0-SNAPSHOT"]]
  :dependencies
  [[org.clojure/tools.nrepl "0.2.13"]]}

gonewest81820:02:14

and deleting the same from my “foo” project from before, and deleting ~/.m2/repository/cider/cider-nrepl/0.17.0-SNAPSHOT, I still have no problem launching the repl:

gonewest81820:02:48

$ lein repl
Retrieving cider/cider-nrepl/0.17.0-SNAPSHOT/cider-nrepl-0.17.0-20180131.161649-9.pom from clojars
Retrieving cider/cider-nrepl/0.17.0-SNAPSHOT/cider-nrepl-0.17.0-20180131.161649-9.jar from clojars
nREPL server started on port 56102 on host 127.0.0.1 - 
REPL-y 0.3.7, nREPL 0.2.13
Clojure 1.8.0
Java HotSpot(TM) 64-Bit Server VM 1.8.0_112-b16
    Docs: (doc function-name-here)
          (find-doc "part-of-name-here")
  Source: (source function-name-here)
 Javadoc: (javadoc java-object-or-class-here)
    Exit: Control+D or (exit) or (quit)
 Results: Stored in vars *1, *2, *3, an exception in *e

user=> Bye for now!

twashing20:02:26

Hmm, I didn’t have the tools.nrepl dependency. Let me try that.

twashing20:02:36

@gonewest818 Ok, starts for me too. Don’t know what I did wrong then.

twashing20:02:43

Sorry for the hub-bub.

gonewest81820:02:22

not a problem!

dominicm20:02:25

@gonewest818 there was a thread, tools.nrepl is test scoped in the pom, and it shouldn't be.