Fork me on GitHub
#cider
<
2016-07-24
>
kgzm00:07:55

For some reason recent versions of cider no longer font-lock/highlight qualified functions from other namespaces. clojure.core gets highlighted and referred functions get highlighted but not qualified functions. some-namespace/wonderful-fn will not be highlighted. Is there a setting to control this or is this feature not working or is it my setup?

kgzm01:07:59

Hrm, sometimes it doesn't even highlight clojure.core, very strange.

sundbp22:07:12

@malabarba: ok, I’ll check that.

akiva22:07:53

Oy. I’ve run into and solved these sorts of errors before but I now for the life of me cannot remember what it was I did to correct them. The situation is me running lein trampoline ring server-headless. Running merely lein trampoline repl :headless presents no difficulty.

WARNING: CIDER's version (0.13.0-snapshot) does not match cider-nrepl's version (nil). Things will break!
and
WARNING: clj-refactor and refactor-nrepl are out of sync.
Their versions are 2.3.0-SNAPSHOT (package: 20160621.902) and n/a, respectively.
Everything looks fine in ~/.lein/profiles and such. I’ve also checked my settings against the documentation provided at but with no luck.

radon22:07:24

Hm. Maybe you have things nested incorrectly in your profiles.clj? Mine looks like

{:user {:plugins [[cider/cider-nrepl "0.12.0"]

                  ;; Linters
                  [jonase/eastwood "0.2.3"]
                  [lein-ancient "0.6.10"]
                  [lein-bikeshed "0.3.0"]
                  [lein-cljfmt "0.5.3"]
                  [lein-kibit "0.1.2"]
                  [venantius/yagni "0.1.4"]

                  ;; Documentation generators
                  [lein-codox "0.9.5"]]}}

radon22:07:54

Otherwise I think it must be some configuration overriding the profiles.clj somehow.

akiva22:07:19

Hm. The Cider docs specifically say the cider-nrepl plug-in should be in {:repl … } rather than :user...

akiva22:07:31

Maybe I should roll back to non-snapshot versions.

radon22:07:37

I’ve never seen that before… but what do I know?

radon22:07:47

I’ve used 0.13.0-SNAPSHOT before and that works fine too.

radon22:07:59

(Well, depending on which Emacs setup I’m on. Different ones seem to want different versions.)

akiva23:07:26

Worse comes to worse, I can just launch the ring server separately from a REPL. I was just trying to conserve memory usage by having them all in one go.

radon23:07:30

I think it’s probably safer to put it in :user, in general.

radon23:07:38

But I don’t know the mechanics of all this.

akiva23:07:31

'Be careful not to place this in the :user profile, as this way CIDER's middleware will always get loaded, causing lein to start slower. You really need it just for lein repl and this is what the :repl profile is for.'

akiva23:07:44

According to the CIDER docs at any rate.

dpsutton23:07:14

does anyone know how to load cider with a profile? Most tests don't run under the default profile and I would like to be able to run tests individually with cider, but i'm unsure how to load the correct profile

akiva23:07:57

From the command-line, you can do stuff like lein with-profile [profile1, profile2] *task*.

dpsutton23:07:30

correct. Just wondering if there was a way to put cider into this mode, so that when running tests i could get the same results

akiva23:07:36

Oh, yeah, I dunno. I do everything via the command line and then cider-connect.

radon23:07:15

Oh… yeah, my lein is probably just starting slowly. Oops.

radon23:07:21

I’ll put it on my list of things to look into.

malabarba23:07:50

@dpsutton: cider-lein-params should let you specify profiles

malabarba23:07:56

and any other lein options

dpsutton23:07:05

i'll try that

dpsutton23:07:16

i'm working on the nrepl stripping out \r characters

malabarba23:07:25

@akiva: That warning could mean a number of different things. There's a section on the manual explaining all of the possibilities

dpsutton23:07:50

it looks like you set a bunch of middleware and pass that into core's version of nrepl

dpsutton23:07:47

just trying to figure out where to start looking

malabarba23:07:20

@dpsutton: I'm confused, what are we talking about now? 🙂

dpsutton23:07:30

haha. cider nrepl

dpsutton23:07:02

lein repl prints this as two lines, whereas cider leaves it as one

dpsutton23:07:24

i'm gonna try to resolve this one, and it makes it easier if i can run tests inside cider

dpsutton23:07:46

but only 2 tests run in the default profile. Whereas 1100 or so run with the +test-clj profile

malabarba23:07:57

It should be enough to do something like: (setq cider-lein-parameters (concat "+test-clj " cider-lein-parameters))

akiva23:07:00

@malabarba, yep, I read that. My ~/.lein/profiles.clj was already configured to match.

dpsutton23:07:10

got any suggestions on where to start looking? Where does the chain start when you evaluate (print "foo\rbar\n")

malabarba23:07:06

@dpsutton: I would look into where Emacs receives the stdout message

malabarba23:07:32

See if it gets a foo\rbar\n or a foobar\n

malabarba23:07:57

If Emacs is receiving a foo\rbar\n then it's up to cider.el to print that properly

dpsutton23:07:15

i looked into (defun cider-repl--emit-output-at-pos (buffer string output-face position &optional bol) and it's already a foobar\n