Fork me on GitHub
#cider
<
2016-02-15
>
samedhi01:02:34

I am getting

ERROR: Unhandled REPL handler exception processing message {:op init-debugger, :print-level 10, :print-length 10, :session f10681b1-e8f4-48c6-bbc9-869f5ec1d54a, :id 7}
java.lang.IllegalStateException: Can't set!: *data-readers* from non-binding thread
whenever I cider-connect from emacs.

samedhi01:02:29

This is after doing a boot development where my deftask is

(deftask development
  "Launch Immediate Feedback Development Environment"
  []
  (comp
   (serve :reload true)
   (watch)
   (reload)
   (cljs-repl)
   (cljs)
   (target :dir #{"target"})))

samedhi01:02:38

Possibly related issues:

bozhidar06:02:40

@samedhi: are you using 0.11-snapshot?

bozhidar06:02:38

the timing of your report seems to coincide with a change we made yesterday https://github.com/clojure-emacs/cider-nrepl/commit/1723057b7dcba57fc10108b0b38f0e6a5293df6d

bozhidar06:02:44

@malabarba: ^^

samedhi07:02:28

@bozhidar Yes, I am using 0.11.0-SNAPSHOT

bozhidar08:02:20

so, this is certainly caused by this recent commit

bozhidar08:02:36

unfortunately I’m not familiar with boot and I’m not sure what’s the best approach here

bozhidar08:02:34

someone with more boot knowledge should help us figure this out

bozhidar08:02:50

I’ve always used only leiningen

jan.zy10:02:19

Hi, which version of clj-refactor and refactor-nrepl should I use to avoid these warnings?

; CIDER 0.10.2 (Java 1.8.0_25, Clojure 1.6.0, nREPL 0.2.12)
WARNING: The following nREPL ops are not supported:
artifact-list artifact-versions clean-ns extract-definition find-symbol find-used-locals hotload-dependency namespace-aliases rename-file-or-dir resolve-missing stubs-for-interface version warm-ast-cache
Please, install (or update) refactor-nrepl and restart the REPL.
You can mute this warning by changing cljr-suppress-middleware-warnings.
WARNING: clj-refactor and refactor-nrepl are out of sync.
Their versions are 2.0.0-SNAPSHOT (package: 20151210.200) and n/a, respectively.
You can mute this warning by changing cljr-suppress-middleware-warnings.
and this is my profiles.clj
{:repl {:dependencies [[pjstadig/humane-test-output "0.7.0"]
                       [org.clojure/tools.nrepl "0.2.12"]]
        :injections [(require 'pjstadig.humane-test-output)
                     (pjstadig.humane-test-output/activate!)]
        :plugins [[cider/cider-nrepl "0.10.2"]
                  [refactor-nrepl "2.0.0-SNAPSHOT"]]}
 :user {:dependencies [[slamhound "1.5.5"]]
        :aliases {"slamhound" ["run" "-m" "slam.hound"]}
        :plugins [[lein-ancient "0.6.8"]]}}

malabarba10:02:16

@r0man I didn't test, so it might not work. But it should

malabarba10:02:24

@samedhi @bozhidar that's annoying. I guess we should just revert the commit and go back to nagging the boot people. :-P

bozhidar10:02:52

I’m guessing it’d be best to revert it for now

bozhidar10:02:05

unless someone wants to fix it properly really fast

jan.zy10:02:24

Second try: I removed refactor-nrepl from my profiles.clj

{:repl {:dependencies [[org.clojure/tools.nrepl "0.2.12"]]        
        :plugins [[cider/cider-nrepl "0.10.2"]
                  #_[refactor-nrepl "2.0.0"]]}
 :user {:dependencies [[pjstadig/humane-test-output "0.7.1"]
                       [slamhound "1.5.5"]]
        :injections[(require 'pjstadig.humane-test-output)
                     (pjstadig.humane-test-output/activate!)]
        :aliases {"slamhound" ["run" "-m" "slam.hound"]}
        :plugins [[lein-ancient "0.6.8"]]}}
and cider repl still complains about invalid version of refactor-nrepl:
; CIDER 0.10.2 (Java 1.8.0_25, Clojure 1.6.0, nREPL 0.2.12)
WARNING: The following nREPL ops are not supported:
artifact-list artifact-versions clean-ns extract-definition find-symbol find-used-locals hotload-dependency namespace-aliases rename-file-or-dir resolve-missing stubs-for-interface version warm-ast-cache
Please, install (or update) refactor-nrepl and restart the REPL.
You can mute this warning by changing cljr-suppress-middleware-warnings.
WARNING: clj-refactor and refactor-nrepl are out of sync.
Their versions are 2.0.0-SNAPSHOT (package: 20151210.200) and n/a, respectively.
You can mute this warning by changing cljr-suppress-middleware-warnings.
user> 

jan.zy10:02:28

What am I doing wrong?

malabarba10:02:05

That's not cider complaining. That's clj-refactor

malabarba10:02:42

You need to uninstall it if you don't want it

malabarba10:02:32

Your you can fix your refactor-nrepl version to the correct one 2.0.0-SNAPSHOT

jan.zy11:02:27

I was using 2.0.0-SNAPSHPOT

jan.zy11:02:38

and I saw the above message when I upgraded cider to v0.10.2

jan.zy11:02:09

I didn’t change versions of clj-refactor and refactor-nrepl - that’s why I am asking here what might happen simple_smile

bozhidar12:02:14

share with us your config

malabarba12:02:08

@jan.zy: But your config says [refactor-nrepl "2.0.0"] =/

jan.zy13:02:06

ok guys let’s start once again. Forget about everything you’ve seen so far 😉 This is my profiles.clj:

{:repl {:dependencies [[org.clojure/tools.nrepl "0.2.12"]]        
        :plugins [[cider/cider-nrepl "0.10.2"]
                  #_[refactor-nrepl "2.0.0"]]}
 :user {:dependencies [[pjstadig/humane-test-output "0.7.1"]
                       [slamhound "1.5.5"]]
        :injections[(require 'pjstadig.humane-test-output)
                     (pjstadig.humane-test-output/activate!)]
        :aliases {"slamhound" ["run" "-m" "slam.hound"]}
        :plugins [[lein-ancient "0.6.8"]]}}
and this is output from my repl:
; CIDER 0.10.2 (Java 1.8.0_25, Clojure 1.7.0, nREPL 0.2.12)
WARNING: The following nREPL ops are not supported:
artifact-list artifact-versions clean-ns extract-definition find-symbol find-used-locals hotload-dependency namespace-aliases rename-file-or-dir resolve-missing stubs-for-interface version warm-ast-cache
Please, install (or update) refactor-nrepl and restart the REPL.
You can mute this warning by changing cljr-suppress-middleware-warnings.
WARNING: clj-refactor and refactor-nrepl are out of sync.
Their versions are 2.0.0-SNAPSHOT (package: 20151210.200) and n/a, respectively.
You can mute this warning by changing cljr-suppress-middleware-warnings.

jan.zy13:02:32

I am 100% sure that I don’t have refactor-nrepl pulled in as deps in project.clj etc

jan.zy13:02:07

I started seeing this messages in repl when I upgraded cider to v0.10.2 in emacs and changed plugin depenency from [cider/cider-nrepl "0.10.1”] to [cider/cider-nrepl "0.10.2”] in profiles.clj.

jan.zy13:02:45

so the question is, why am i still seeing these warnings in repl

jan.zy13:02:58

second question is how can i enable refactor-nrepl in cider 0.10.2 ?

jan.zy13:02:29

(and thanks for your help 😉 )

pandeiro14:02:12

@malabarba I'm a Boot person -- what can I do to help?

pandeiro14:02:35

(by person, I mean user, not developer)

pandeiro14:02:57

I can also confirm I see the same error in 0.11.x snapshot

benedek14:02:45

@jan.zy: you are getting the warning because the emacs package is installed but there is no nrepl middleware on your classpath: > WARNING: clj-refactor and refactor-nrepl are out of sync. > Their versions are 2.0.0-SNAPSHOT (package: 20151210.200) and n/a, respectively.

benedek14:02:08

uncomment the refactor-nrepl line in you profiles.clj and change the version to `2.0.0-SNAPSHOT or alternitvely (perhaps even better): upgrade to either 2.0.0 (if you prefer stable) or 2.2.0-SNAPSHOT on both the emacs package and the middleware

jan.zy14:02:35

ahh ok, thanks

benedek14:02:05

just one caveat @jan.zy: if you keep using cider 0.10.2 you better go with 2.0.0 stable clj-refactor

benedek14:02:25

2.2.0-snapshot is compatible with cider 0.11.0-snapshot

benedek14:02:59

dependencies, i know… 😕

jan.zy14:02:11

ok so my profiles.clj should look like this:

{:repl {:dependencies [[org.clojure/tools.nrepl "0.2.12"]]        
        :plugins [[cider/cider-nrepl "0.10.2"]
                  [refactor-nrepl "2.0.0-SNAPSHOT"]]}
 :user {:dependencies [[pjstadig/humane-test-output "0.7.1"]
                       [slamhound "1.5.5"]]
        :injections[(require 'pjstadig.humane-test-output)
                     (pjstadig.humane-test-output/activate!)]
        :aliases {"slamhound" ["run" "-m" "slam.hound"]}
        :plugins [[lein-ancient "0.6.8"]]}}

jan.zy14:02:44

but how can I change the version of refactor-nrepl on the emacs package?

benedek14:02:44

given that you have not upgraded your emacs package

jan.zy14:02:03

I installed version 0.10.2 from melpa stable yesterday

benedek14:02:04

so the emacs package is clj-refactor.el

benedek14:02:29

so reinstall clj-refactor.el from melpa stable to get 2.0.0

jan.zy14:02:45

yes, that should solve the problem

benedek14:02:54

and then change the version 2.0.0-SNAPSHOT to 2.0.0 in your profiles.clj

jan.zy14:02:07

I’ll check it later now I have to go back to writing selenium tests 😕

jan.zy14:02:11

in clojure simple_smile

benedek14:02:21

haha sounds like fun 😉

benedek14:02:31

good luck for both simple_smile

jan.zy14:02:04

Thanks benedek

jan.zy14:02:37

Yet another question: Sometimes I can see this message in my Messages buffer:

error in process filter: nREPL: No response handler with id nil found

jan.zy14:02:40

What is that?

benedek14:02:12

this looks weird tbh. if you by any chance can reliably reproduce pls create an issue on github

jan.zy15:02:18

that’s one of two race conditions I have while working with cider

jan.zy15:02:29

quite hard to reliably reproduce

malabarba17:02:14

I haven't seen an error like that in a while now

malabarba17:02:53

Check your *nrepl-messages ...* buffers when that happens, and file a github issue with the last 10 messages or so.

jan.zy18:02:16

should i file this issue in cider-nrepl proejct?

malabarba19:02:44

either one is fine