This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-03-22
Channels
- # beginners (24)
- # boot (80)
- # braid-chat (11)
- # cider (89)
- # clara (11)
- # cljsfiddle (5)
- # cljsjs (9)
- # cljsrn (63)
- # clojure (114)
- # clojure-austin (1)
- # clojure-berlin (5)
- # clojure-brasil (4)
- # clojure-dusseldorf (5)
- # clojure-hamburg (17)
- # clojure-india (1)
- # clojure-new-zealand (3)
- # clojure-poland (1)
- # clojure-russia (91)
- # clojure-taiwan (1)
- # clojure-uk (54)
- # clojurebridge (3)
- # clojurescript (170)
- # core-matrix (1)
- # cursive (14)
- # datomic (8)
- # emacs (13)
- # hoplon (96)
- # immutant (20)
- # jobs (9)
- # jobs-rus (13)
- # kosmos (3)
- # off-topic (8)
- # om (111)
- # onyx (41)
- # parinfer (116)
- # pedestal (2)
- # proton (4)
- # re-frame (46)
- # reagent (7)
- # ring-swagger (24)
- # slack-help (2)
- # testing (1)
- # untangled (8)
oh well, that sure derailed my daily Clojure session. Time to sleep now, I’ll keep looking into it tomorrow. @malabarba Thanks for your help!
@malabarba: yeah, I get the same thing when refactor-nrepl is in my :plugins vector
error persists when I specify the refactor-nrepl plugin version specifically instead of just the snapshot, tried back to the 20160228 release
@sanjayl: I don’t even have a ~/.lein/profiles.clj at the moment, and I’m still getting that prompt 😞
IIUC, cider in this case automatically decides the dependencies it needs and specified them through the command used to start the repl?
@zzamboni, that's right, the jack-in command automatically adds the refactor-nrepl plugin (take a look at the Messages buffer thing you pasted above)
will quickly check and see if there's a way to turn that plugin off in jack in, if not, can always start the repl on the command line and then connect to the running REPL
@sanjayl: after setting cider-inject-dependencies-at-jack-in
to nil
, the dependencies are not injected in the command anymore
I set up a minimal profiles.clj with {:user {:plugins [[cider/cider-nrepl "0.11.0"]]}}
, but I’m still getting the “Lisp expression” prompt
@zzamboni, thanks! If you still need plugins, you can customize the cider-jack-in-lein-plugins variable
The profiles.clj won't make a difference, since emacs is setting the plugins directly, not reading from profiles.clj
I guess I still don’t understand the interactions and dependencies between the Emacs and Clojure bits
This has been by far the most frustrating part of learning Clojure - getting Emacs set up just right 😞
yeah, there are a lot of moving pieces. So the red txt in the REPL basically tells you that you can't use anything that the refactor-nrepl plugin provides
correct, you won't be able to use the parts of refactor-nrepl that require processing by the middleware, you can still use the parts that are done directly on the emacs side
i mean correction. here's what I added to my .emacs to get the REPL to work with jack-in:
`(defun my-clojure-mode-hook () (setq cider-jack-in-lein-plugins '(("cider/cider-nrepl" "0.12.0-SNAPSHOT")))`
I really need some sleep now - @sanjayl and @malabarba, thanks for the help and the pointers! I’ll keep poking tomorrow.
@zzamboni: I’m guessing something’s wrong in your cider setup, as I can’t imagine where this Lisp expression prompt would come from
https://raw.githubusercontent.com/clojure-emacs/cider/master/doc/images/cider_architecture.png
@bozhidar: thanks for your message. I’ve been thinking of restarting my Clojure-related Emacs setup from zero by myself, since I jumpstarted it from @nonrecursive’s setup described in his book, which got me started very quickly and gave me a nice overview, but I think now it’s time for me to build my own so I fully understand what’s in there 😉
@zzamboni: @sanjayl if you want to stop clj-refactor specifically to inject its dependencies set cljr-inject-dependencies-at-jack-in
to nil. but superficially reading the chatlog that might not be the problem
the point is with this autoinject feature that you don’t need to edit your profiles.clj
anymore. @sanjayl you should not need any additional stuff in your emacs init scripts either. if cider-inject-dependencies-at-jack-in
is *not* set to nil cider should take care of that
@zzamboni: you probably checked already but you need at least leiningen 2.5.3 as well (if memory serves…)
bozhidar: for all the squiggly and clj-refactor injections do I need cider 0.11.0 or 0.12.0-SNAPSHOT ?
benedek: how does the injection work for 2.2.0? Just get the latest clj-refactor.el and add it to the clojure-mode-hook?
(this is all very cool btw. The emacs support for clojure keeps getting better and better)
no need to add anything to your profiles.clj
anymore. in fact better if you get rid of cider/refactor stuff in there
checking squiggly it seems that this autoinject deps was added at 24th feb so it should be there in their snapshot. if I understand their gitlog right 😉
Hey, I am curious if the following confs in ~/.lein/profiles.clj
is still relevant with recent Cider snapshot versions
{:user {:plugins [[cider/cider-nrepl "0.12.0-SNAPSHOT"]
[refactor-nrepl "2.0.0"]]
:dependencies [[cider/cider-nrepl "0.12.0-SNAPSHOT"]
[org.clojure/tools.nrepl "0.2.12"]
[com.cemerick/piggieback "0.2.1"]]
:repl-options {:nrepl-middleware
[cemerick.piggieback/wrap-cljs-repl
cider.nrepl.middleware.apropos/wrap-apropos
cider.nrepl.middleware.classpath/wrap-classpath
cider.nrepl.middleware.complete/wrap-complete
cider.nrepl.middleware.debug/wrap-debug
cider.nrepl.middleware.format/wrap-format
cider.nrepl.middleware.inspect/wrap-inspect
cider.nrepl.middleware.macroexpand/wrap-macroexpand
cider.nrepl.middleware.ns/wrap-ns
cider.nrepl.middleware.pprint/wrap-pprint
cider.nrepl.middleware.refresh/wrap-refresh
cider.nrepl.middleware.resource/wrap-resource
cider.nrepl.middleware.stacktrace/wrap-stacktrace
cider.nrepl.middleware.test/wrap-test
cider.nrepl.middleware.trace/wrap-trace
cider.nrepl.middleware.out/wrap-out
cider.nrepl.middleware.undef/wrap-undef]}}}
you don’t need the cider related stuff anymore. including the tools.nrepl dependency.
however if you are on clj-refactor 2.0.0 you still need the [refactor-nrepl "2.0.0”]
bit.
alternatively you can upgrade to clj-refactor 2.2.0-SNAPSHOT of clj-refactor or 2.2.0 stable in few hours (just releasing see above)
@zzamboni @bozhidar yeah, I need to include clear instructions for updating very badly. my plan is to do a screencast showing how
@bozhidar another way of looking at it is that your work is so great, it’s timeless 😄
@nonrecursive: btw, I’m guessing it would be beneficial to update the web version of the book
and maybe add a note there that by the time someone is reading this the exact setup for the latest version might be different
great idea
@turbopape @rmuslimov @malabarba: Pressing enter on #dbg
or deleting it and reevaluating the function removes the breakpoint just fine. @malabarba nice update, though
@zzamboni: I just did an fresh out of the box install of cider and clj-refactor. No customizations, profile.clj, etc and everything worked perfectly without the issue we were running into yesterday. Will try again in my typical setup and let you know if I find anything.
@sanjayl, @malabarba thanks again! I will try this later today
I just had a thought: enable the \scratch\ buffer for Clojure/cider mode...does anyone else do this?
@sanjayl, @malabarba: I have started from a clean Emacs config, and cider-jack-in works fine. Something I had in my previous setup.
I’m also using the opportunity to re-create my emacs config from scratch, with use-package this time 😉