0

I have used Emacs for almost 40 years and little has been as frustrating as the repeatedly broken cider packages in melpa-stable.

I have only two entries in my package list

package-archives is a variable defined in ‘package.el’. Its value is

   (("gnu" . "http://elpa.gnu.org/packages/")
    ("melpa-stable" . "http://melpa.milkbox.net/packages/"))

For some time before today I had been using cider-0.17.0-SNAPSHOT with the corresponding nrepl version number. But I did an update in the Emacs package manager which loaded a cider-0.17-0-SNAPSHOT with yesterdays date (22 Jan 2018).

Now starting cider with cider-jack-in in every project (10+) which was working yesterday yields a "ERROR: Unhandled REPL handler exception processing message" and a huge stack trace.

Interestingly if you replace the nrepl dependency in project.clj with an older version, e.g. [[cider/cider-nrepl "0.16.0"], cider-jack-in starts but gives the warning that cider and cider-nrepl versions differ and "things will break"

So, after many hours of work, I have gone from what was a working cider-0.17.0-SNAPSHOT system (until the melpa-stable Jan 22 update to cider-0.17.0-SNAPSHOT) to once again working cider-0.16.0 system.

So where is the corruption happening? The melpa-stable tag on GitHub is 0.16.0, yet somehow with only melpa-stable (+ gnu) in my package list the broken 0.17.0-SNAPSHOT is getting loaded.

Without perhaps a lot of Git pain I really don't need I can't find the diffs between the pre-Jan22 cider-0.17.0-SNAPSHOT and the Jan22 SNAPSHOT.

So the only option is to go back to manually installing cider-0.16.0 and going back to the corresponding nrepl version. But it was all working very well with cider-0.17.0-SNAPSHOT before someone corrupted melpa-stable with a broken SNAPSHOT.

Broken shit does not belong in melpa-stable.

How do we fix melpa-stable to be stable?

phils
  • 71,335
  • 11
  • 153
  • 198
  • 4
    I'm voting to close this question as off-topic because it is about issues with releases of an open source project which should be addressed to that project directly instead of SO. We are not the support team or complaint department for that project, and we have no influence over what *broken shit* ends up in melpa-stable here. – Ken White Jan 24 '18 at 04:16
  • Although the subject is delivered a bit aggressively, I think the reason was the version conflict b/w Lein and Emacs parts. I remember I was suffering from the same trouble. I shared my thoughts below. – Ivan Grishaev Jan 24 '18 at 07:07
  • Joost Diepenmaat's update/observation seems crucial: you are *not* using the `melpa-stable` repository. – phils Jan 25 '18 at 01:00

2 Answers2

4

For a very long time now, CIDER hasn't needed any clojure-side configuration if you run cider-jack-in. Get rid of anything related to nrepl, and cider in your project.clj and lein profiles.clj and CIDER should start working out of the box.

Also, if you want melpa-stable then you probably also want to use the full release of CIDER, not some snaphot. CIDER 0.16.0 is what is on melpa stable now and it works fine for me.

UPDATE: I see you're actually using the straight-up melpa, which is not melpa-stable (that has "http://stable.melpa.org/packages/" as the url)

Joost Diepenmaat
  • 17,633
  • 3
  • 44
  • 53
2

What you do wrong here is you specify Cider's version directly in you project file. Please do not do that. Every single project may require its own Cider version whereas in Emacs you may have only one version installed at once. So switching between them dynamically would be a mess.

The solution is to specify Cider package not in project.clj but in ~/.lein/profiles.clj file. Here is mine:

~> cat ~/.lein/profiles.clj
{:user {:signing {:gpg-key "........."}
        :plugins [[cider/cider-nrepl "0.15.1"]]}}

In my Emacs, I've got the version 0.15.1 installed manually from the releases Git page.

This file does not affect your Git history at all. Lein tool merges it to the project.clj content automatically when it starts. Moreover, now you can work with the only one Cider installed across all of your projects. Please remove all the Cider package declarations from your project.clj files.

Once you have time, please read the official Lein profile manual.

Ivan Grishaev
  • 1,583
  • 10
  • 15