CIDER 2.0: Sky is the Limit
Two weeks ago I wrote that CIDER 2.0 was brewing. Today the brew is ready - CIDER 2.0 (“Terceira”)1 is officially out! I promised the release would follow the preview within a week or two if nothing serious surfaced, and for once in my life I’m actually on schedule.
The preview post covered the big themes in detail - the
transient menus, the
call-graph browsers,
cider-macrostep,
the revamped tracing and
enlighten, the
ClojureScript improvements - so I won’t rehash all of that here. Instead I’ll
focus on what changed between the preview and the release, and on the bigger
picture of what CIDER 2.0 is actually about.
What CIDER 2.0 is about
Looking back at the (enormous) changelog, the release boils down to four themes:
- Tackle some ambitious ideas that had been lying dormant for ages - inline macro stepping, rich (content-type) results, source-aware cross-referencing. Some of the issues closed by this release were filed the better part of a decade ago.
- Polish the “understand your code” toolbox - the debugger, the macroexpansion facilities, tracing, enlighten, the stacktraces and the cross-references all got a serious amount of love.
- Make the whole CIDER experience more consistent and discoverable - transient menus everywhere, one tree-view widget shared by all the browsers, and a naming cleanup that brought a bunch of stragglers in line.
- Fix old annoyances - the friendly-session complexity that 1.22 started taming (remember the redisplay lag fix and default sessions?), the find-references gaps, the flaky SSH tunnels, the confused stdin handling.
Notice what’s not on that list - a pile of shiny new features. There are a few genuinely new things in 2.0, of course, but the heart of this release is that most of CIDER’s important features got overhauled (tastefully, I hope) or made more robust and faster. After 14 years you accumulate a lot of good ideas with rough edges; 2.0 is me going over them with fine-grit sandpaper.
What landed after the preview
Quite a lot, as it turns out - the last two weeks were busy. The headliners:
- Rich results
are now on by default. Evaluate something that returns an image
and it renders inline; a result that points to external content (a file, a
URL) gets a
[show content]button that fetches it only when you press it. HTML renders as formatted text, URLs are clickable. This works for regularC-x C-e-style evaluations too, not just in the REPL (configurable viacider-eval-rich-content-destination). Fun fact: content-type support was added way back in 0.17, disabled in 0.25 after it got a bit overzealous with the fetching, and the interactive-eval part was requested in 2018. Better late than never, right? - The transient story got finished. The debugger and the inspector now have
menus of their own (
?andmrespectively), and many menus grew argument flags - pick a pretty-printer per invocation, set test selectors once and reuse them across runs, toggle the refresh modes, pass aliases at jack-in. As before, your muscle memory is safe - the menus only help when you pause. - There’s a new
cider-doctorcommand that checks your Emacs setup and your active session for common problems (version mismatches, stale byte-code, leftover obsolete config) and produces a copy-pasteable report. My hope is that it will make “CIDER doesn’t work” bug reports a thing of the past - or at least give us something to look at when they arrive. - Pending evaluations now show an animated spinner overlay right at the form you’re evaluating, instead of a spinner in the mode-line of a REPL buffer you probably can’t even see.
- The debugger got
dusted off properly: quitting a debug session finally
restores point to where you started - an issue
filed in 2016 - the
force-step-out key works again, and
cider-nrepl0.62 fixed a batch of instrumentation bugs (records surviving instrumentation, clear errors for forms too big to instrument, and a few crashes). - Stdin handling
got a long overdue overhaul - input prompts are routed to the
session that actually asked for input, cancelling a prompt now interrupts the
evaluation (instead of quietly letting it continue), and
C-c C-dsends EOF for code that reads until end of input. - Clicking a stack frame for a top-level anonymous function now jumps to the
actual source instead of
clojure.core/fn- a bug from 2020 - and ClojureScript frames render theirns/fnproperly. - A big consistency pass over the options: the REPL history browser is now
cider-history, the inline-result options became a coherentcider-eval-result-*family, and the six per-buffer auto-select options collapsed into a singlecider-auto-select-buffer. Every old name keeps working as an obsolete alias, so nothing breaks. - And a long tail of robustness work - a slow memory leak on the
eldoc/completion path,
cider-classpathon Windows, formatting no longer corrupting multi-line strings, theme-aware colors for the nREPL message log, and plenty more of the same ilk.
The documentation also got restructured to be more approachable - there’s a
proper quickstart now, a
keybindings reference page,
dedicated pages on using CIDER alongside
clojure-lsp and
clojure-ts-mode,
and a guide for
full-stack Clojure + ClojureScript projects.
The manual has grown organically for over a decade, and it showed; hopefully
finding things is much easier now.
Upgrading
Despite the big scary version number, upgrading should be uneventful. All the
renames ship with obsolete aliases, the transient menus preserve the classic
keybindings, and the only removals are commands that had been no-ops for years.
The one bit of muscle memory you may need to adjust: cider-macroexpand-all
moved from C-c M-m to C-c M-m a, as C-c M-m is now a prefix for all the
macroexpansion commands. If anything feels off after the upgrade, M-x
cider-doctor is your friend.
Fourteen years later
CIDER 0.1 (well, nrepl.el 0.1) was released on July 10th, 2012 - fourteen
years (and five days) ago.2 I’ve been reflecting on this a lot lately.
Fourteen years is an eternity in our line of work - entire ecosystems have come
and gone in that time - and yet here we are, still innovating, still improving,
still moving forward. I dare say CIDER 2.0 is the strongest release in the
project’s history, and it’s certainly the one I’ve enjoyed working on the most.3
None of this would have been possible without the people and organizations who have supported the project over the years - everyone who contributed code, reported issues, wrote about CIDER, answered questions, or backed the project financially. A special thanks to Clojurists Together for their long-standing support, and to everyone who took the snapshot for a spin after the preview post and shared feedback - several rough edges got filed down because of you.
So, go play with CIDER 2.0! Kick the tires, explore the menus, crack open some values in the inspector, step through a macro or two. And if CIDER makes your work a little nicer every day, consider supporting its future development
- that’s what keeps CIDER and friends going.
Where to from here? The sky is the limit. The REPL is the inspiration. The best is always yet to come…
Keep hacking!
-
Continuing the Azores naming streak started by 1.22 (“São Miguel”). “Terceira” literally means “the third” in Portuguese, which is a slightly confusing name for a 2.0 release, but naming things has never been my strong suit. ↩
-
The full origin story is in CIDER Turns 10, if you’re curious how a prototype hacked on a flight to San Francisco ended up here. ↩
-
That I can remember. My memory is not what it used to be. ↩