Cursive 1.11.0-eap1 is out. It’s a fairly experimental release containing support for scripting with Babashka, something which util now has been pretty painful with Cursive. It also fixes a bug, but that fix is also fairly experimental - more below.
Babashka has been difficult to support in Cursive because it contains a lot of implicit dependencies which Cursive doesn’t know about when resolving symbols. Here’s how the new support works right now. Depending on how well all this works it may be subject to change in the future, but I hope not. There is also not as much validation as I’d like that all these parts are in place at each step, so if you stray too much from this path you may see weirdness.
There’s still more to do on the Babashka support, in particular this release doesn’t do anything at all with bb.edn. So if you’re adding extra dependencies via that those won’t work for the moment, and there’s no task running support yet either. I also want to support socket REPLs with Babashka which won’t work currently. There’s also some funkiness in the REPL completions which needs investigating.
There’s also a fix for a problem with the Deps support. Deps doesn’t provide a way to name projects, and this is a problem when syncing to IntelliJ because it requires modules to have a name. Previously Cursive would just name the module using the name of the directory containing the project, but it was often the case that projects would have multiple directories called “api” or something similar. Cursive will now try to name these modules using the names of directories above the project until the module names are unique. This means that module names might change when syncing if a new project has been added in a directory which causes a name conflict where one wasn’t present previously. I’m considering this change experimental for the moment as well since I’m not sure if this might cause subtle problems.
In the greatest tradition of experimental builds, just after releasing this I’m going to go away hiking with my family for the rest of the week. So I hope it works :-). If this release does break anything for you for any reason, you can always downgrade to the stable release.
Since IntelliJ 2021.2 is now out, Cursive will no longer support IntelliJ 2020.2 as of this release.
Here are the issues:Added