(This post is regarding a very particular issue at the intersection of
Emacs, Clojure, and CIDER, so most readers can probably skip it,
but I figured the solution deserved to be somewhere on the internet.)
CIDER has this awesome feature via clj-refactor where it can
automatically add missing libspecs to your ns form as soon as you
type an aliased var name using an :as alias you have previously used
for that namespace:
Screen recording showing how CIDER and clj-refactor can add missing libspecs.
You can define a preferred set of (:as) aliases via
cljr-magic-require-namespaces in your Emacs config, and, whether
you’ve done that or not, CIDER tries hard to be smart, offering you
choices if you’ve previously used the same alias for different
namespaces in different places in your project (e.g.s/ for
clojure.spec some places and the same for clojure.string in other
places).
Moreover, CIDER evaluates the namespace form, bringing in the new
requires, allowing you to just keep typing and coding, without
breaking your flow.
This is all fantastic, but I ran across one particular scenario where
this kept biting me: my user namespace.
After the news from the Clojure/conj that Datomic is
now free, I was excited to get home and upgrade and access newer
features and high-availability. Herein are notes from how that
upgrade process went that I hope will be helpful to anyone else
upgrading, including difficulties I had running the official Datomic
AMIs.