Fork me on GitHub
#cider
<
2015-11-25
>
escherize03:11:49

I have a quandary! I can't seem to get clj-refactor 1.1.0 to install properly. http://take.ms/LH0RG

escherize03:11:54

I've deleted ~/.emacs.d/elpa/cljr-refactor* directories and installed clj-refactor.el through melpa-stable multiple times. Inspected the .el file (which for sure says 1.1.0). However when I call cljr-version I get that string in the minibuffer.

escherize03:11:38

I'm not sure where 1.0.5 can even be coming from.. Is there another directory I should checkout?

escherize03:11:15

Ah hah! I found something fishy in vendor.

escherize03:11:43

deleted that package thusly and all looks good! Thanks for making cider/clj-refactor.el

bozhidar06:11:42

@waffletower: I just wished people discussed their issues with CIDER on the issue tracker /here/mailing list, instead of keeping them to themselves

bozhidar06:11:54

this particular gist is pretty old I think

bozhidar06:11:15

as I recall having read it before EuroClojure

bozhidar06:11:44

ah, 4th of October 2014

bozhidar06:11:53

it even predates inf-clojure simple_smile

isaac10:11:01

@escherize: just restart emacs and repl server

jonpither16:11:11

Anyone seen this exception whilst hacking nrepl middleware? http://pastebin.com/Eq8JnD65

jonpither17:11:24

Hmm, so the session atom passed into nrepl middleware, if you add a key-pair, where the key is a keyword, then you generate the above error

fvaresi17:11:20

hi there... first of all, congratulations for the amazing work simple_smile

fvaresi17:11:42

next, I have a noob question: is it possible that cider-refresh is executed automatically?

fvaresi17:11:29

I'm having an issue with a project that uses component library, and I think the code that sets the system is being accidentally executed

malabarba17:11:42

@jonschoning: Yes. The session bindings map is just for variable values

malabarba17:11:50

so it's a map from vars to values

malabarba17:11:23

If you're adding a keyword to it, then you probably want to do something else

malabarba17:11:52

@fvaresi: Cider doesn't do that. But there are clojure plugins out there that eagerly load your entire project

malabarba17:11:06

I think refactor-nrepl is one

fvaresi17:11:33

hmmm... I do have that library in my profiles file... thanks!

malabarba17:11:27

I think there's a way to disable that specific feature

malabarba17:11:41

If you verify that this is indeed being caused by refactor-nrepl, you can try asking them

fvaresi17:11:24

I finally confirmed it was clj-refactor/refactor-nrepl, so I will keep debugging from there

fvaresi17:11:01

the strangest thing is that despite editing the profiles.clj and my emacs config, I had to remove clj-package to get rid of any clj-refactor message

fvaresi17:11:27

and after that everything behaved as expected... thanks for your help @malabarba simple_smile

benedek18:11:47

just to be specific @fvaresi refactor-nrepl uses tools.analyzer to analyze your namespaces and that also evals your first level forms

benedek18:11:14

setting cljr-eagerly-build-asts-on-startup to nil stops that behaviour

benedek18:11:36

ASTs will be built on demand only (that will make certain clj-refactor features slow)

benedek18:11:19

on an other note if you use the component framework you should not have a first level form which changes the state of the project I think… so what is being eval-ed which > sets the system ?

aaelony18:11:10

I'm using CIDER 0.6.0 and have caused Cider to freeze. Is there a way to restore it?

bozhidar18:11:52

0.6 is ancient

aaelony18:11:08

I see. I will upgrade. Best way to upgrade?

bozhidar18:11:15

I’d suggest upgrading to the latest stable release

bozhidar18:11:39

install the latest stable version of CIDER from melpa-stable

bozhidar18:11:55

install the required nrepl middleware

bozhidar18:11:00

and restart your Emacs

bozhidar18:11:17

the README goes into greater details about this

aaelony18:11:20

great, thanks.. will do

jonpither18:11:49

sometimes my nrepl middleware never gets called at all with ops such as 'eval'. I have a hunch my middleware only gets called for tooling operations, like it gets configured incorrectly at the start

jonpither18:11:48

is nrepl-connected-hook the place to hook off for messing around with nrepl sessions still?

malabarba18:11:33

@jonpither currently cider doesn't treat eval ops differently from other ops. What sort of messing around are you doing?

aaelony18:11:49

I've upgraded to CIDER 0.8.2, the message I get now is Please, install (or update) cider-nrepl 0.8.2 and restart CIDER. WARNING: CIDER's version (0.8.2) does not match cider-nrepl's version (0.9.1) is 0.9.1 not recommended?

aaelony18:11:12

confused as to what is needed next.

aaelony18:11:03

ah I think I am using marmalade and not melpa-stable.

jonpither18:11:59

@malabarba: recording commands, and periodically sending analysis data back to a listener I create from nrepl-connected-hook

jonpither18:11:36

sometimes it works, sometimes it doesn't, depending on how the middleware starts up

jonpither18:11:08

I'm digging into it, but wondered if there's anything obvious I should know

malabarba18:11:37

@aaelony your cider on the emacs side is still old

aaelony18:11:52

yes, I am now connected to the right melpa

malabarba18:11:55

Might be because you installed from Marmalade

aaelony18:11:11

yes, I think so.. 😉

malabarba18:11:30

@bozhidar we should either update the marmalade package or politely ask nic to remove it

aaelony19:11:02

what is the correct version of cider-nrepl? the docs say 0.9.1, the project.clj says "0.10.0-SNAPSHOT"

malabarba19:11:23

@jonpither so you have a custom middleware for the eval op, and it communicates with a listener you set up with nrepl-connected-hook? Can't see anything obviously wrong with that.

malabarba19:11:01

@aaelony the latest stable is 0.9.1, the other version is the development snapshot

aaelony19:11:18

@malabarba: the last thing I need to sync now is CIDER requires nREPL 0.2.7 (or newer) to work properly

aaelony19:11:49

not sure where that gets set yet

malabarba19:11:54

That one's a lein bug

aaelony19:11:12

ohnooo. is there a fix?

malabarba19:11:16

Add tools.nrepl to your project's dependencies

malabarba19:11:27

With version "0.2.12"

benedek19:11:30

or .lein/profiles.clj

aaelony19:11:44

ok, adding [org.clojure/tools.nrepl "0.2.11"]

malabarba19:11:00

It's the most recent IIRC

malabarba19:11:32

Yes. I think their readme is outdated

malabarba19:11:47

I'm pretty sure 0.2.12 is the most recent

aaelony19:11:52

added 0.2.12 to my profiles.clj. It now says WARNING: CIDER requires nREPL 0.2.7 (or newer) to work properly

malabarba19:11:04

Still a lein bug

malabarba19:11:07

One more thing

aaelony19:11:20

btw, I guess project.clj is not going to become project.cljc, lol

malabarba19:11:20

Add ^:replace before the dep

malabarba19:11:06

I'm going off memory here. But I think that's how it works

aaelony19:11:08

confused about ^:replace ... that goes in the profiles.clj?

malabarba19:11:34

It goes immediately before [tools.nrepl ...]

malabarba19:11:04

So ^:replace [tools.nrepl "0.2.12"]

aaelony19:11:17

thanks for clarifying.. trying...

aaelony19:11:15

same warning as before...

aaelony19:11:38

unter anderem seems pretty great! snappy

aaelony19:11:23

and it appears to know about cljc too... feels like the future simple_smile

aaelony19:11:25

thanks everyone

malabarba19:11:01

I'll check later which configs I use. Might be misremembering something

aaelony19:11:43

cool, thanks

benedek19:11:50

my profiles.clj just has:

:user {:dependencies [
                       [org.clojure/tools.nrepl "0.2.12”]]

benedek19:11:13

plus the plugins etc ofc

fvaresi19:11:08

thanks for the reply @benedek . I still have to do some debugging but I had to move to a different task

benedek19:11:23

no worries, you can still use the elisp only functions in clj-refactor even without the refactor-nrepl middleware

fvaresi19:11:43

sure. I do want to spend some more time with it when I have a chance since it may help others.

fvaresi19:11:29

might just be a problem of version compatibility since I was using melpa and nrepl snapshot with clojure 1.6

fvaresi19:11:15

I just read latest clj-refactor only supports clojure 1.7, correct?

benedek19:11:03

yeah that is true

benedek19:11:22

some of our dependencies use cljc files now so we have to use 1.7 to make sense of those

aaelony19:11:08

I've upgraded to CIDER 0.9.1 now, but if I do something inadvertent cider might hang. It's hanging now for example, is there anything I can do to get back to a normal state?

aaelony19:11:37

is there a way to kill the clojure repl and reload it?

aaelony19:11:03

(without losing the elaborate window settings I have)

bozhidar22:11:19

I’m not sure what you mean by “hang"

bozhidar22:11:28

cider shouldn’t hang at all

bozhidar22:11:50

some long running evaluation can be interrupted with C-c C-c