nREPL 1.4
nREPL 1.4.0 is out! This month we celebrate 15 years since nREPL’s development started, so you can consider this release part of the upcoming birthday celebrations.
So, what’s new?
Probably the highlight is the ability to pre-configure default values for dynamic
variables in all nREPL servers that are launched locally (either per project or
system-wide). The most useful application for this would be to enable
*warn-on-reflection*
in all REPLs. To achieve this, create ~/.nrepl/nrepl.edn
with this content:
{:dynamic-vars {clojure.core/*warn-on-reflection* true}}
Now, any nREPL server started from any IDE will have *warn-on-reflection*
enabled.
$ clojure -Sdeps "{:deps {nrepl/nrepl {:mvn/version \"1.4.0\"}}}" -m nrepl.cmdline -i
user=> #(.a %)
Reflection warning, NO_SOURCE_PATH:1:2 - reference to field a can't be resolved.
Note: nREPL doesn’t support directly XDG_CONFIG_HOME
yet, but you can easily
override the default global config directory (~/.nrepl
) with NREPL_CONFIG_DIR
.
Another new feature is the ability to specify :client-name
and :client-version
when
creating a new nREPL session with the clone
operator. This allows collecting information
about the clients used, which some organizations might find useful. (I know Nubank are
making use of this already)
One notable change in nREPL 1.4 is the removal of support for Clojure 1.7. Clojure 1.7 was released way back in 2015 and I doubt anyone is using it these days, but we try to be extra conservative with the supported Clojure versions and this is only the second time nREPL’s runtime requirements were bumped in the 7 and a half years I’ve been the maintainer of the project. (early on I bumped the required Clojure from 1.2 to 1.7)
As usual the release features also small bug-fixes and internal improvements. One such improvement was
the introduction of matcher-combinators
in our test suite. (which was the main motivation to bid farewell to Clojure 1.7)
You can check out the release note for a complete list of changes.
That’s all I have for you today. I hope we’ll have more exciting nREPL news to share by nREPL’s “official” birthday, October 8th.1 Big thanks to everyone who has contributed to this release and to all the people supporting my Clojure OSS work! In the REPL we trust! Keep hacking!
-
nREPL 0.1 was released on Oct 11, 2015. ↩