Cursive 1.10.0-eap1

114 views
Skip to first unread message

Cursive

unread,
Dec 3, 2020, 8:55:04 PM12/3/20
to cur...@googlegroups.com

Hi everyone,

Cursive 1.10.0-eap1 is out! It contains a fix for an annoying bug under IntelliJ 2020.3, and some new features that many of you have been waiting a long time for.

First - the bug. In IntelliJ 2020.3, the namespace navigation is broken. This is due to an IntelliJ bug, I had the workaround in my local copy for a while but I had quite forgotten that it hadn’t made it into a 1.9.x release - my apologies for that omission. I’ll try to get this EAP stable as quickly as possible so that those upgrading to 2020.3 have a smooth upgrade path.

There are several new features in this release. Cursive now finally includes a test runner! As with the rest of the test integration this currently only supports Clojure code using clojure.test but I’m hoping to extend this soon, in particular for running CLJS tests. You can configure the test runs using the new clojure.test run configuration type, and test files will now have gutter icons for quickly running either test namespaces or individual test vars. I just realised recently that there is an issue with the test selection - currently when you specify a module to run all tests from, tests from that module and all dependent modules will be executed. That may or may not be what you want, and will be configurable in the next EAP.

Another much-requested feature is being able to customise the name which appears in the REPL tab for a particular REPL, so you can give your REPLs names in order to be able to distinguish them. You can also update the REPL name later by double-clicking the tab, but this will only change the name of the current session, it won’t update the run config for future sessions. There’s also a migration which will update existing run configurations, but unfortunately due to another IntelliJ bug this only happens for run configs shared in project files, not IDE-local ones shared in the workspace file. Those will get a little red X in their icon until you open them up in the run config editor, and the defaulting will happen at that time.

Finally, one thing that several users have asked for is the ability to modify files from dependencies and load the modified files into a REPL. This can be useful for hotfixing bugs, but also for instrumenting library code with debug reader macros and the like. IntelliJ doesn’t allow this, but there’s a new action in the context menu for library files which will copy the file to a new scratch file. Then you can edit it there and load it into a REPL. This release includes several other fixes for scratch file support, but they’re still intrinsically a little funky so things may not work exactly as they do in a normal editor.

Apart from all this there are also a couple of other bugfixes.

Since IntelliJ 2020.3 is now GA, I would normally drop support for 2019.3 at this point. However, due to the namespace switching bug, 1.10.0 will continue to have support for 2019.3, and I’ll drop it for later point releases.

Here are the issues:

Added

  • Action to allow library dependencies to be copied to scratch files #2463
  • Repl profile name on tab #2282
  • Feature Request: Named REPLs #1974
  • Test runner #247

Fixed

  • Namespace navigation not available with IntelliJIdea 2020.3/Cursive 1.9.4-2020.3 #2467
  • Cursive doesn’t support unqualified data reader tags #2464
  • No structural editing in clojure scratch buffer #2461
  • “Show usages” dialog not appearing again for namespaced keywords #2457
  • ClojureDocs aren’t shown for CLJS files #2392
  • Clojure scratch files cannot be loaded into REPL due to file extension #1528

Cheers,
Colin

Reply all
Reply to author
Forward
0 new messages