Fork me on GitHub
#cider
<
2018-08-08
>
sofra06:08:23

Hi all, I am trying to jack in to the latest Cider from a project using :pedantic? :abort and I am getting the following errors:

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 ::...
error in process sentinel: nrepl-server-sentinel: Could not start nREPL server: Possibly confusing dependencies found:
[org.clojure/tools.nrepl "0.2.13" :exclusions [org.clojure/clojure]]
 overrides
[org.clojure/tools.nrepl "0.2.12" :exclusions [org.clojure/clojure]]

Consider using these exclusions:


Aborting due to :pedantic? :abort
I am guessing the tools.nrepl “0.2.12” is coming from leiningen itself? I have had not luck excluding it. Anyone have any ideas?

bozhidar07:08:35

Yes, it’s coming from lein itself.

bozhidar07:08:31

One option for you would be to override cider-jack-in-dependencies (the list of deps that get auto-injected).

sofra07:08:26

hmmm, ok thanks

bozhidar07:08:45

I personally use pedantic just from time to time to audit the state of deps, but I don’t run every single command with it.

bozhidar07:08:07

Too much noise, like this example you outlined - clearly this was done on purpose to supply a newer version of the library.

rickmoynihan09:08:08

when is cider 0.18.0 planned to be released? Is it relatively soon or some way off?

bozhidar09:08:33

@rickmoynihan Relatively soon, but there’s no concrete date for this. @vspinu asked for a bit more time to collect feedback about the new connection management system and improve it, before we cut the release.

bozhidar09:08:54

Generally nothing more is planned for it. Adding the support for nREPL 0.4 was the final big item on the todo list.

bozhidar09:08:41

I’d love to also incorporate @gonewest818’s improved handling of big responses, but it’s unlikely this will make it in 0.18.

rickmoynihan10:08:27

thanks @bozhidar … how usable is the current melpa (non -stable) build? And what needs to be done to update to it? Do I just unpin cider and clojure-mode, M-x package-install cider / clojure-mode and bump cider/cider-nrepl to 0.18.0-SNAPSHOT in my profiles.clj?

rickmoynihan10:08:50

btw amazing job :thumbsup: on keeping the CHANGELOG updated for master https://github.com/clojure-emacs/cider/blob/master/CHANGELOG.md#master-unreleased

bozhidar10:08:49

I think it’s pretty usable. I would have probably declared it stable if Vitalie didn’t insist on squeezing more work into it.

😆 4
alexdavis12:08:25

Since a few days ago my emacs completely freezes up when doing cider-jack-in after Direct connection to localhost:58363 established The only way to regain control is to kill the emacs process. Running the repl from the command line and using cider-connect works however

alexdavis12:08:12

Incase it helps, heres what jack-in is doing

Starting nREPL server via clojure -A:dev:build:dev/cljs -Sdeps '{:deps {org.clojure/tools.nrepl {:mvn/version "0.2.13"} com.billpiel/sayid {:mvn/version "0.0.16"} refactor-nrepl {:mvn/version "2.4.0-SNAPSHOT"} cider/cider-nrepl {:mvn/version "0.18.0-SNAPSHOT"}}}' -e '(require (quote cider-nrepl.main)) (cider-nrepl.main/init ["com.billpiel.sayid.nrepl-middleware/wrap-sayid", "refactor-nrepl.middleware/wrap-refactor", "cider.nrepl/cider-middleware"])'...

dpsutton12:08:23

try it without refactor nrepl and sayid. I believe there is a release of refactor-nrepl that plays nice. I haven't heard anything about sayiid

dpsutton12:08:57

i believe this is a nrepl tools.contrib.nrepl collision

alexdavis13:08:14

Any idea whats injecting sayid? Removing refactor nrepl didn’t fix it

👀 4
alexdavis13:08:51

Seems to be spacemacs, is it possible to edit the clojure layer to stop those thing being injected when I do cider-jack-in? Sorry I’m new to all of this stuff

soulflyer13:08:29

@alex395 There was a whole load of stuff a couple of days ago. Sorry, I don't remember the details, I'm not a spacemacs user, but if you scroll back a bit I think you might find some helpful stuff.

👌 4
bozhidar13:08:28

refactor-nrepl, should work now. In this instance likely the problem is caused solely by sayid. I’ve opened a PR for it, but it hasn’t been merged yet.

bhauman13:08:13

I used C-c C-p more often than I used C-x C-e the new format is having an impact, of course I can change it back

bozhidar14:08:13

Yeah, @plexus also mentioned it. Didn’t know people were using this so much. After I’ve reverted the conflicting change in Projectile I can bring this back.

lilactown15:08:05

I’m not sure how I get the latest version of refactor-nrepl tbh. should it just download the latest?

alexdavis15:08:10

Thanks @lilactown that did the trick!

👍 4
alexdavis15:08:53

Although a bit annoying to not have clj refactor anymore.. Guess its just until they update things

bozhidar15:08:56

A few people already reported that the latest snapshot works fine for them with CIDER 0.18 and nREPL 0.4.

lilactown15:08:58

@alex395 try enabling the cljr-inject... var and see if it still freezes. like said above, a new release has been cut

lilactown15:08:13

I’m going to try it after I finish this code-thought 😛

bozhidar15:08:21

But as I said - sayid is not updated and should not be used for the time being.

lilactown15:08:03

@bozhidar got it. I really appreciate the work you do and the quick action

lilactown15:08:22

I honestly have never used sayid, so I doubt I’ll miss it in the meantime

👍 4
bozhidar15:08:41

Hmm, what’s injecting it then? Is this something done by Spacemacs?

pauld15:08:57

yes spacemacs

alexdavis16:08:01

Still get a freeze when I enable cljr, I’m using CIDER 0.18 although I’m not entirely sure I’m using nREPL 0.4, can’t see it in my deps.edn

alexdavis16:08:28

Or does CIDER bring in nREPL by itself?

bozhidar16:08:45

cider-nrepl depends on nREPL 0.4.4

bozhidar16:08:33

It will use it by default, but if it seems that nREPL 0.2.x is already loaded (e.g. because you did lein repl, it will use nREPL 0.2 instead.

dominicm16:08:06

@bozhidar when was the snapshot cut?

bozhidar16:08:30

Yesterday morning (at least for me).

bozhidar16:08:21

And here’s a ticket which verifies that it works https://github.com/clojure-emacs/cider/issues/2399

alexdavis16:08:23

Is there any way for me to figure out if its loading the right version of nREPL?

bozhidar16:08:46

You see what version was chosen when CIDER boots.

alexdavis16:08:11

Hmm this is what I get

[nREPL] Starting server via /usr/local/bin/clojure -A:dev:build:dev/cljs -Sdeps '{:deps {org.clojure/tools.nrepl {:mvn/version "0.2.13"} refactor-nrepl {:mvn/version "2.4.0-SNAPSHOT"} cider/cider-nrepl {:mvn/version "0.18.0"}}}' -e '(require (quote cider-nrepl.main)) (cider-nrepl.main/init ["refactor-nrepl.middleware/wrap-refactor", "cider.nrepl/cider-middleware"])'...
[nREPL] server started on 55686
[nREPL] Establishing direct connection to localhost:55686 ...
[nREPL] Direct connection to localhost:55686 established

alexdavis16:08:44

In the cider buffer

alexdavis16:08:49

Yeah it is 0.4.4

bozhidar16:08:10

Hmm, I see your using cljs.

bozhidar16:08:29

Not sure what the deps are there, but you need the latest and greatest piggieback, figwheel, shadow, etc.

alexdavis16:08:38

It works when I have (setq cljr-inject-dependencies-at-jack-in nil)

bozhidar16:08:39

Older versions don’t work with nREPL 0.4.

bozhidar16:08:48

Interesting.

alexdavis16:08:10

I’ll go through and make sure everything else is up to date though

benedek16:08:58

re. what is injecting sayid. just like with the other packages the emacs package has some code injecting it the same way as cljr

benedek16:08:15

so if you disable/remove the emacs package for sayid that should do the trick too

dominicm16:08:43

You may need to rm -rf a folder in m2 cache to get latest snapshot

bozhidar16:08:36

I tested this same invocation command myself and CIDER works just fine with the latest refactor-nrepl.

benedek16:08:07

sayid is an awesome idea, not sure it is maintained, cared for nowadays

bozhidar16:08:46

We can ask the author to transfer it to our org, but I’m not maintaining one more project. 😄

benedek16:08:11

haha i don’t think it really took off tbh…

dominicm16:08:36

I think he wanted to commercialize it, not sure where that went 🙂

dpsutton16:08:04

Wish it would have worked. Bill piel I think?

lilactown18:08:19

I noticed that my dir-locals aren’t working now

((clojure-mode
  (cider-clojure-cli-global-options . "-A:server:dev")))
could that be related to the latest snapshot release?

lilactown18:08:54

nvm, I just needed to reopen the buffer

bozhidar18:08:25

Seems there’s just one commit in the past year and something and it’s from @benedek 🙂

bozhidar18:08:48

I think someone should advise the Spacemacs team to remove this from the default config.

michal20:08:59

anyone here already uses cider 0.18.0 with figwheel? I'm getting tons of exceptions trying to connect to already started repl.

michal20:08:50

as I noticed, it's enough not to require [figwheel-sidecar.system] to have connection working. so I guess something's wrong with figwheel?

bhauman23:08:22

oh somehow you are getting cider.nrepl instead of clojure.tools.nrepl

bhauman23:08:14

if you add clojure tools nrepl to your project I think things should work