Fwd: [ANN] CIDER 0.9

79 views
Skip to first unread message

Sean Corfield

unread,
Jun 16, 2015, 1:51:42 PM6/16/15
to emacs...@googlegroups.com
Is it too early to start discussing a new Emacs Live release that includes CIDER 0.9 in the stable packs?

Begin forwarded message:

From: Bozhidar Batsov <bozh...@batsov.com>
Subject: [ANN] CIDER 0.9
Date: June 16, 2015 at 7:33:26 AM PDT

Hey everyone,

CIDER 0.9 is finally out! You can read more about the release here http://batsov.com/articles/2015/06/16/cider-0-dot-9/

Enjoy (responsibly)! :-)


Sam Aaron

unread,
Jun 16, 2015, 1:55:00 PM6/16/15
to emacs...@googlegroups.com
Now is a great time to start preparing for a new release!

Sam
> --
> You received this message because you are subscribed to the Google Groups "Emacs Live" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to emacs-live+...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Sam Aaron

unread,
Jun 17, 2015, 5:14:54 AM6/17/15
to emacs...@googlegroups.com
I’ve made a start updating to 0.9 in the dev packs. Could you give them a try and see if they work for you?

One that that I stumbled on for a while was that I needed to add some new things to my ~/lein/.profiles.clj It now looks like this:

{ :user {:plugins [[cider/cider-nrepl "0.9.0"]
[refactor-nrepl "1.0.5"]]
:dependencies [[org.clojure/tools.nrepl "0.2.7"]]}
}

Sam

Stan Dyck

unread,
Jun 17, 2015, 2:50:17 PM6/17/15
to emacs...@googlegroups.com
Is there a "best practices" way to switch back and forth between stable
and dev packs? Symlinking? Editing init.el or emacs-live.el? Environment
variables?

Thanks,
StanD.

Sam Aaron

unread,
Jun 17, 2015, 4:00:55 PM6/17/15
to emacs...@googlegroups.com
Yep,

add the following to your ~/.emacs-live.el

(live-use-dev-packs)

Sam

Sean Corfield

unread,
Jun 17, 2015, 4:32:50 PM6/17/15
to emacs...@googlegroups.com
On Jun 17, 2015, at 2:14 AM, Sam Aaron <sama...@gmail.com> wrote:
> I’ve made a start updating to 0.9 in the dev packs. Could you give them a try and see if they work for you?

I did git submodule init / git submodule update in order to pull the dev packs fully in and got this error:

Cloning into 'packs/dev/lang-pack/vendor/submodules/haskell'...
remote: Counting objects: 5463, done.
remote: Compressing objects: 100% (28/28), done.
remote: Total 5463 (delta 13), reused 0 (delta 0), pack-reused 5435
Receiving objects: 100% (5463/5463), 3.40 MiB | 2.16 MiB/s, done.
Resolving deltas: 100% (3118/3118), done.
Checking connectivity... done.
fatal: reference is not a tree: db3c4693ca428ef7e28ef0a2433fe6fe26cdadb1

Unable to checkout 'db3c4693ca428ef7e28ef0a2433fe6fe26cdadb1' in submodule path 'packs/dev/lang-pack/vendor/submodules/haskell'

That seems to stop the loading process when it hits the Haskell lang-pack and none of the packs after that load properly (including my local live packs for zenburn and ponylang-mode).

If I comment out the (live-load-config-file "haskell-conf.el") line in the lang-pack init.el, I can get it to start properly.

We start an nREPL server inside our app so I already had tools.nrepl as a dependency. I bumped that to 0.2.10 because that’s what cider-nrepl (also already a dependency) pulls in, although refactor-nrepl pulls in 0.2.7. Despite updating both our regular dependencies and our plugins list, I couldn’t get rid of the warning (when doing M-x cider-jack-in) that CIDER requires nrepl 0.2.7 or later, and lein deps :tree seems to indicate tools.nrepl 0.2.6 is still being pulled in (by Leiningen itself, I believe). CIDER seems to work fine regardless.

However, trying to connect to the nREPL server we start in our app now produces an error that we don’t have refactor-nrepl installed so I guess we need to update the middleware of how we start our server. I’ll consult the CIDER docs for that.

Sean Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)



Sam Aaron

unread,
Jun 17, 2015, 4:55:01 PM6/17/15
to emacs...@googlegroups.com
oops. Could you try again now?

Sam

Stan Dyck

unread,
Jun 17, 2015, 5:27:18 PM6/17/15
to emacs...@googlegroups.com
I'm still not getting the haskell submodule. Is there a magic git
command I'm missing? I did

git submodule init
and
git submodule update

StanD.

Sean Corfield

unread,
Jun 17, 2015, 5:33:45 PM6/17/15
to emacs...@googlegroups.com
On Jun 17, 2015, at 2:27 PM, Stan Dyck <stan...@gmail.com> wrote:
> I'm still not getting the haskell submodule. Is there a magic git command I'm missing? I did

You first need to git pull to pick up the latest Emacs Live then…

> git submodule init
> and
> git submodule update

…you’ll need git submodule update -f to force a new update.

(Took me a while to figure that out — but I have the full stack working locally now!)

Stan Dyck

unread,
Jun 17, 2015, 5:39:41 PM6/17/15
to emacs...@googlegroups.com
What version of emacs are you running, Sean?

Sean Corfield

unread,
Jun 17, 2015, 5:44:02 PM6/17/15
to emacs...@googlegroups.com
On Jun 17, 2015, at 1:32 PM, Sean Corfield <se...@corfield.org> wrote:
> On Jun 17, 2015, at 2:14 AM, Sam Aaron <sama...@gmail.com> wrote:
>> I’ve made a start updating to 0.9 in the dev packs. Could you give them a try and see if they work for you?
>
> I did git submodule init / git submodule update in order to pull the dev packs fully in and got this error:

With the latest git pull (thank you Sam!) and a git submodule update -f to _force_ the Haskell submodule to be updated, I can get everything up and running.

> Despite updating both our regular dependencies and our plugins list, I couldn’t get rid of the warning (when doing M-x cider-jack-in) that CIDER requires nrepl 0.2.7 or later, and lein deps :tree seems to indicate tools.nrepl 0.2.6 is still being pulled in (by Leiningen itself, I believe). CIDER seems to work fine regardless.

I added this to our various project.clj files:

:profiles {:user {:dependencies [[org.clojure/tools.nrepl "0.2.10"]] …

and that got rid of the version warning. Leiningen complains that we have a :user profile in our project file but I want this consistent across everyone’s machines automatically, rather than having folks having to mess with their local environment.

> However, trying to connect to the nREPL server we start in our app now produces an error that we don’t have refactor-nrepl installed so I guess we need to update the middleware of how we start our server. I’ll consult the CIDER docs for that.

This took me a while to figure out. The solution I came up with was fugly but seems to work:

(:require …
[cider.nrepl :as cider]
[clojure.tools.nrepl.server :as server]
[refactor-nrepl.middleware :as refactor])

(let [handler (apply nrepl/default-handler
(concat (map resolve cider/cider-middleware)
[#'refactor/wrap-refactor]))
…]
(nrepl/start-server :port 1234 :handler handler))

I’m surprised the default middleware for CIDER doesn’t include the refactor stuff since connecting to an nREPL server without it complains…

Anyways, I’m all up and running now and I’ll let you know if I hit any weirdness.

Sean Corfield

unread,
Jun 17, 2015, 5:45:15 PM6/17/15
to emacs...@googlegroups.com
On Jun 17, 2015, at 2:39 PM, Stan Dyck <stan...@gmail.com> wrote:
> What version of emacs are you running, Sean?

Emacs 24.5.1 with the latest master of Emacs Live as my .emacs.d folder (a direct clone of Sam’s repo).

Stan Dyck

unread,
Jun 17, 2015, 6:44:18 PM6/17/15
to emacs...@googlegroups.com
Whew! I am up and running on the latest as well.

It looks as if you need to have at least version 24.4 of emacs. I had to
upgrade my Debian-latest 24.3.1 to get it working. (built from source)

I also had to upgrade git beyond the Debian latest 1.9.1 for magit to
load properly. I pulled the latest down from the git-core PPA.

I've already noticed that the clojure namespace completion is a lot more
snappy.

StanD.

gvim

unread,
Jun 20, 2015, 1:04:33 PM6/20/15
to emacs...@googlegroups.com
On 17/06/2015 10:14, Sam Aaron wrote:
> I’ve made a start updating to 0.9 in the dev packs. Could you give them a try and see if they work for you?
>
> One that that I stumbled on for a while was that I needed to add some new things to my ~/lein/.profiles.clj It now looks like this:
>
> { :user {:plugins [[cider/cider-nrepl "0.9.0"]
> [refactor-nrepl "1.0.5"]]
> :dependencies [[org.clojure/tools.nrepl "0.2.7"]]}
> }
>
> Sam
>

Any chance of the current (laggy for me) auto-complete being swapped out
for company-mode in the next release?

gvim

Sam Aaron

unread,
Jun 20, 2015, 2:43:09 PM6/20/15
to emacs...@googlegroups.com
I haven’t released a new Emacs Live yet - I’ve just updated the dev packs.

I’ll look into how much work it will be to swap out to company-mode.

Sam

Sean Corfield

unread,
Jun 20, 2015, 3:30:46 PM6/20/15
to emacs...@googlegroups.com
On Jun 20, 2015, at 11:43 AM, Sam Aaron <sama...@gmail.com> wrote:
> I haven’t released a new Emacs Live yet - I’ve just updated the dev packs.

The CIDER folks are planning to put out 0.9.1 around EuroClojure due to some serious bugs discovered in 0.9.0 so you probably don’t want to rush an Emacs Live release — wait for CIDER 0.9.1.

Sam Aaron

unread,
Jun 20, 2015, 4:34:31 PM6/20/15
to emacs...@googlegroups.com
Yep, already on it, don’t worry :-)

Sam

Sean Corfield

unread,
Jul 2, 2015, 12:07:28 PM7/2/15
to emacs...@googlegroups.com
On Saturday, June 20, 2015 at 11:43:09 AM UTC-7, Sam Aaron wrote:
I haven’t released a new Emacs Live yet - I’ve just updated the dev packs.

I just saw that Magit 2.1.0 has been released and we now have CIDER 0.9.1. I switched back to stable for now (since my team mates are on stable packs) but it looked like the Magit in the dev packs was way newer than the one in the stable packs?

Beyond testing the dev packs as you update them, is there anything else we can do to help move toward a new stable Emacs Live release?

Sean

Sam Aaron

unread,
Jul 3, 2015, 9:23:26 AM7/3/15
to emacs...@googlegroups.com
Howdy,

I just updated the dev packs to CIDER 0.9.1 and Magit 2.1.0.

Could you give it a whirl?

Sam

Sean Corfield

unread,
Jul 3, 2015, 3:55:49 PM7/3/15
to emacs...@googlegroups.com
On Jul 3, 2015, at 6:22 AM, Sam Aaron <sama...@gmail.com> wrote:
> I just updated the dev packs to CIDER 0.9.1 and Magit 2.1.0.

Thanks.

> Could you give it a whirl?

I updated our project to depend on cider-nrepl 0.9.1 and I’m getting this warning when I start a REPL:

; CIDER 0.9.1 (Java 1.8.0_31, Clojure 1.7.0, nREPL 0.2.10)
WARNING: The following nREPL ops are not supported:
extract-definition rename-file-or-dir stubs-for-interface warm-ast-cache
Please, install (or update) refactor-nrepl and restart REPL.
You can mute this warning by changing cljr-suppress-middleware-warnings.
WARNING: clj-refactor and refactor-nrepl are out of sync.
Their versions are 1.1.0-SNAPSHOT and 1.0.5, respectively.
You can mute this warning by changing cljr-suppress-middleware-warnings.
user>

We already depend on refactor-nrepl 1.0.5 so this seems to be due to clj-refactor which I assume is in Emacs Live somewhere?

I’ll ask on #cider on the Clojurians Slack to confirm.

Sean Corfield

unread,
Jul 3, 2015, 4:18:49 PM7/3/15
to emacs...@googlegroups.com
OK, so to solve this I have to change our refactor-nrepl dependency to 1.1.0-SNAPSHOT but that means my project has to depend on a snapshot version which is not acceptable.

Can I suggest you roll back clj-refactor to 1.0.5 so folks don’t have to depend on a snapshot in their Clojure project?

Sean

Sam Aaron

unread,
Jul 3, 2015, 7:26:39 PM7/3/15
to emacs...@googlegroups.com
yep, rolled back clj-refactor to 1.0.5 - good call, thanks.

Any other issues at this stage?

Sam

Sean Corfield

unread,
Jul 3, 2015, 7:54:51 PM7/3/15
to emacs...@googlegroups.com
On Jul 3, 2015, at 4:26 PM, Sam Aaron <sama...@gmail.com> wrote:
> yep, rolled back clj-refactor to 1.0.5 - good call, thanks.

Great! Updated my dev packs, and rolled back my project dependencies to 1.0.5 to match. Confirmed no warnings and Leiningen is happy I have no snapshot dependencies now :)

> Any other issues at this stage?

Nothing yet. Losing Branch Manager in the new Magit was a bit of a shock but `y` (Show Refs) is more powerful (once I’d discovered it).

I’ll keep using it over the weekend and let you know if I trip over anything else but it’s looking good overall. I’ll probably have to go back to stable on Monday to sync back up with my team.

Thank you!!

gvim

unread,
Jul 3, 2015, 7:59:32 PM7/3/15
to emacs...@googlegroups.com
On 20/06/2015 19:43, Sam Aaron wrote:
> I haven’t released a new Emacs Live yet - I’ve just updated the dev packs.
>
> I’ll look into how much work it will be to swap out to company-mode.
>
> Sam
>

Any chance of getting auto-complete-mode replaced with company-mode for
the next release?

gvim

Sean Corfield

unread,
Jul 4, 2015, 10:33:01 PM7/4/15
to emacs...@googlegroups.com
On Jul 3, 2015, at 4:26 PM, Sam Aaron <sama...@gmail.com> wrote:
> yep, rolled back clj-refactor to 1.0.5 - good call, thanks.

FWIW, Benedek says the 1.1.0 release of clj-refactor is fairly imminent so it might still make it into the next Emacs Live release? :)

Sam Aaron

unread,
Jul 6, 2015, 4:22:36 AM7/6/15
to emacs...@googlegroups.com
I’m in no massive rush to push out a new Emacs Live - so happy to wait for cli-refactor 1.1.0 :-)

Sam

Sam Aaron

unread,
Jul 6, 2015, 10:03:50 AM7/6/15
to emacs...@googlegroups.com
updated dev packs to cli-refactor 1.1.0 :-)

Sean Corfield

unread,
Jul 6, 2015, 12:41:49 PM7/6/15
to emacs...@googlegroups.com
On Jul 6, 2015, at 7:03 AM, Sam Aaron <sama...@gmail.com> wrote:
> updated dev packs to cli-refactor 1.1.0 :-)

Thanks. Testing it this morning, I ran into a problem:

Emacs Live seems to have its own custom version of paredit? The refactorings rely on standard paredit functions, e.g., paredit-move-forward, but that’s not defined in Emacs Live (it has live-paredit-forward instead).

This breaks some of the refactorings. Some very useful ones.

I can understand having updated/improved versions of some paredit functions, but why are the original functions not also available?

Sam Aaron

unread,
Jul 6, 2015, 3:33:13 PM7/6/15
to emacs...@googlegroups.com
Not sure why you’re seeing what you’re seeing. My understanding was that the Emacs Live live-* fns were distinct (and didn’t replace) any similarly named counterparts. I’ll take a closer look.

One thing is that Emacs Live might be using an outdated version of Paredit…

Sam

Sam Aaron

unread,
Jul 6, 2015, 3:38:45 PM7/6/15
to emacs...@googlegroups.com
just updated paredit - could you try again?

Sam

Sean Corfield

unread,
Jul 6, 2015, 3:54:02 PM7/6/15
to emacs...@googlegroups.com
On Jul 6, 2015, at 12:38 PM, Sam Aaron <sama...@gmail.com> wrote:
> just updated paredit - could you try again?

Now it works! Thank you!

Will keep working with the dev packs this week and let you know if I hit anything else.

Andrea Richiardi

unread,
Jul 8, 2015, 3:34:43 PM7/8/15
to emacs...@googlegroups.com
Hello guys, I started following this conversation a bit late (after banging my head upgrading to 24.4 and git > 1.9.1). I also updated everything in my https://github.com/arichiardi/emacs-live. By the way, in the branch ar-stable there I also added squiggly-clojure which is very neat and, if stable, in a couple of day I can send a PR.
Reply all
Reply to author
Forward
0 new messages