The State of Some Emacs Packages for Clojure Development

There are quite a few packages in the “official” clojure-emacs GitHub organization, but many of them have been deprecated recently with the release of CIDER 0.7. Unfortunately not everyone is aware of this yet and I often see tickets related to those deprecated projects. In this short post I’ll outline the deprecations and provide a bit of background for them.

clojure-test-mode

The venerable clojure-test-mode was deprecated in favor of cider-test (which is bundled with CIDER 0.7). clojure-test-mode featured quite a lot of inlined Clojure code, which made the package very hard to maintain and reworking it to use nREPL middleware was a no-brainer for us. clojure-test-mode will be removed from the clojure-mode repo at some point. It also interferes with CIDER’s initialization, so you’re strongly encouraged to get rid of it.

Down the road we might extend cider-test to support other test frameworks as well (which should be feasible with different middleware providing the same interface).

company-cider

company-cider was deprecated, because company-mode integration was added to CIDER itself (making company-mode the officially supported and recommended completion library).

ac-nrepl

ac-nrepl has been superseded by ac-cider. ac-cider has a simpler codebase and leverages the compliment-based completion introduced in CIDER 0.7. We’ll probably remove ac-nrepl at some point in the future to avoid the confusion between the two.

cider-inspect

cider-inspect was absorbed into CIDER 0.7.

cider-tracing

cider-tracing was superseded by middleware-based tracing support integrated in CIDER 0.7.

Epilogue

Those deprecations are also mentioned in the documentation of the respective packages, but I feel it’s nice to have them listed together in a single document. Most of the packages will also emit load-time deprecation warnings.

CIDER 0.7

CIDER 0.7 is finally out and it’s an epic release! It’s without a doubt the most important release since the inception of the project about two years ago and it’s the biggest one in terms of features and code changes.

The release is special for a number of reasons. Allow me to quickly enumerate though them.

More …

Permalinks in the Clojure style guide

I’m happy to report that now you can use permalinks to the rules listed in the community Clojure style guide as well.

Here’s an example. Now you can easily refer to rules in heated style debates with your friends and co-workers.

This is an addition that was way overdue (for which I take all the blame). I’d like to say a big THANKS!!! to rbf who found the time I never did and got the job done (in style).

Permalinks in the Ruby and Rails style guides

I’m happy to report that now you can use permalinks to the rules listed in the community Ruby and Rails style guides.

Here’s an example. Now you can easily refer to rules in heated style debates with your friends and co-workers.

This is an addition that was way overdue (for which I take all the blame). I’d like to say a big THANKS!!! to Tod Beardsley who found the time I never did and got the job done (in style).

P.S. Hopefully soon the permalinks will be leveraged by RuboCop.

Find out where a rake task is defined

Have you ever wondered where a particular rake task is defined? Enter rake -W (introduced in rake 0.9):

$ rake -W db:schema:load

rake db:schema:load                 /Users/bozhidar/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/activerecord-4.1.1/lib/active_record/railties/databases.rake:236:in `block (2 levels) in <top (required)>'
rake db:schema:load_if_ruby         /Users/bozhidar/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/activerecord-4.1.1/lib/active_record/railties/databases.rake:240:in `block (2 levels) in <top (required)>'

You can also invoke rake -W without an argument and you’ll get a listing of all available rake tasks and their source locations.

Pretty neat, right?