Fork me on GitHub
#cider
<
2016-08-09
>
echristopherson21:08:48

I forced cider to be installed from melpa-stable, but it's still telling me cider-nrepl's version is nil. What can I do?

akiva21:08:25

@echristopherson, check out http://cider.readthedocs.io/en/latest/troubleshooting/#missing-nrepl-messages-buffer and scroll down to 'CIDER complains of the cider-nrepl version’.

echristopherson21:08:16

specifically I have 20160806.2354 -- which I think is what I had in melpa-unstable too, come to think of it.

akiva21:08:19

Heh, yeah, that’s the same one I have.

echristopherson21:08:43

I don't understand the statement "Note, that running cider-jack-in from outside the scope of a project will result in the older (0.2.6) nREPL dependency being used (at least on Leiningen 2.5.1). This is likely a Leiningen bug."

echristopherson21:08:31

-- I infer from it that the 'scope of a project' (does that mean the CWD Emacs is running in? Or the CWD as set from within Emacs by M-x cd?) determines specifics of CIDER/nrepl...

echristopherson21:08:01

but if I put 0.2.12 in ~/.lein/profiles.clj, shouldn't it always use that unless told otherwise?

akiva21:08:57

Using cider-jack-in, based on what I understand, does some kind of dependency injection which is why I suppose it defaults to 0.2.6 if it can’t infer from the project what it should be using.

akiva21:08:14

I use cider-connect so I’m not 100% certain how that side of it works.

echristopherson21:08:01

so you also don't know how it determines the "scope of a project" with c-j-i?

radon21:08:48

@echristopherson: You need to uninstall the previously installed version for your “pinned repository” setting to take effect.

radon21:08:25

I presume that cider just walks upward through the directory tree until it finds a project.clj (in which case it’s in a project) or not.

radon21:08:55

Do you have melpa-stable in your repositories alist?

echristopherson22:08:06

@radon yes, but through which directory tree? Is it one of Emacs's CWDs?

radon22:08:24

It’s the directory for the current file, I think.

radon22:08:29

Perhaps you mis-spelled a symbol.

radon22:08:02

Yeah, I just checked. If I select a file outside a project, even if I started Emacs inside a project, I get the “vanilla” REPL not linked to a project.

echristopherson22:08:06

should I uninstall any other cider- packages?

echristopherson22:08:14

thanks for checking

radon22:08:28

What other packages? I only have cider.

radon22:08:55

(Personally, I prefer to have my packages load automatically on startup, so whenever I have a problem with them I just wipe ~/.emacs.d/elpa and relaunch Emacs.)

echristopherson22:08:56

I have other cider pkgs available but not installed. But I do have clojure-mode and clojure-mode-extra-font-locking

echristopherson22:08:45

I'm using flyingmachine/emacs-for-clojure

echristopherson22:08:52

It specifies the packages manually in init.el

echristopherson22:08:39

a ha! I accidentally put melpa-unstable in.

radon22:08:59

In the case of using a prebuilt Emacs setup there could be any number of reasons setting the pinned repository doesn’t take effect. But you should be able to uninstall cider from M-x package-list-packages, then go to the stable version (find something like Other versions: 0.13.0) and install that.

echristopherson22:08:42

oh, I didn't know about the "Other versions"

radon22:08:58

Yes, you can install from any repository using package.el’s package-list-packages.

radon22:08:06

The pinned repositories simply allow you to automate this process.

echristopherson22:08:21

Is there a good way to just record in version control the actual versions of packages, so at any moment you can roll back to those versions (without storing the actual packages in the version control)?

radon22:08:01

I don’t think so. AFAIK there’s no way (yet) to download an old version of a package using package.el.

radon22:08:28

The only thing you can do is add them as submodules, which gives you some separation and additional convenience, at least.

echristopherson22:08:38

In list-packages it says one package can be upgraded. How do I see which one?

echristopherson22:08:14

I wrestled with submodules in my Vim setup... I was always tearing my hair out.

echristopherson22:08:56

seems to be, if the browser page is any indication

echristopherson22:08:08

ah, now I finally got plain old 0.13.0 installed

echristopherson22:08:14

Where does Emacs get the information it needs to present the statement Available as a package in and melpa.milkbox.net. in the window that pops up when you hit ? on a package line?

echristopherson22:08:43

I'm not understanding why it lists unstable melpa there but not stable (I have it installed from stable now)

echristopherson22:08:04

oh, I'm guessing now that's actually part of the actual package description/metadata

echristopherson22:08:11

other packages don't have it

echristopherson22:08:31

argh, I'm still getting the complaint. WARNING: CIDER's version (0.13.0) does not match cider-nrepl's version (nil). Things will break!

echristopherson22:08:15

cider-inject-dependencies-at-jack-in is t

echristopherson22:08:32

I'm not in a project, so depending on clojure 1.7.0 isn't relevant

echristopherson22:08:47

my lein --version is 2.6.1

echristopherson22:08:19

cider-boot-parameters is repl -s wait

echristopherson22:08:57

but does it need to be cloned inside a project? I just put it in a toplevel directory and ran lein install within in, which seems to have put it in my local dependency repo

echristopherson22:08:38

I get the same from cider-connect (in a newly minted project dir)

echristopherson22:08:37

ok, working now from the new project (after adding the plugin to project.clj)

radon22:08:41

You can I-search (`C-s`) in the package listing, to find something like available for upgrade.

radon22:08:36

You need to check the whole flyingmachine Emacs setup to make sure melpa (non-stable) is not added anywhere. Presumably it is, because otherwise you shouldn’t be seeing packages from it.

radon22:08:32

I can’t say how this would (or not) work with boot, since I use lein.

radon22:08:44

It works by default with lein.

radon22:08:02

I turned off cider-inject-dependencies-at-jack-in, though, and put cider-nrepl in my profiles.clj.

echristopherson22:08:49

ah, finally! I feel so stupid

echristopherson22:08:24

but I'm understanding more of how things fit together

echristopherson22:08:52

it turns out... and here's the stupid part... I had left a really old cider-nrepl plugin vector in ~/.lein/profiles.clj

echristopherson22:08:05

to make matters worse, I had it in :user instead of :repl

radon22:08:10

Question—does boot read profiles.clj?

echristopherson22:08:23

I don't use boot either, that I know of.

radon22:08:58

Oh. I had assumed you were since you cited your cider-boot-parameters.

radon22:08:34

You want cider-lein-parameters for Leiningen.

echristopherson22:08:55

No, I was listing it since it was one thing to pay attention to according to the page linked by @akiva