Cursive 1.8.2

356 views
Skip to first unread message

Cursive

unread,
Jul 24, 2019, 8:34:44 PM7/24/19
to cur...@googlegroups.com

Hi everyone,

Cursive 1.8.2 is out!

This release adds support for IntelliJ 2019.2. 2019.2 made a big change at the platform level, the Java support was finally split out into a true standalone plugin. Previously for historical reasons it had been blessed in various ways. This is great news for Cursive since it relies on the Java support, and that support was previously not available in the smaller IDEs like WebStorm and PyCharm. It should now be possible (although I haven’t tested this) to install the Java support and Cursive in those IDEs and use it there. However this change had a lot of implications and bugs at the platform level which took a long time to shake out, so unfortunately support for 2019.2 hasn’t had a lot of testing.

There have been two main problems. One was IDEA-217619, which broke the Deps integration. That bug is fixed but some users are still experiencing ongoing problems with the Deps support. I’m hoping to fix those quickly.

The other is IDEA-211736 - this causes all symbol resolution to fail sporadically, and is a problem that started in IntelliJ 2019.1. A fix has been developed for this, but unfortunately it didn’t make the 2019.2 release since it’s a fix to a complicated and intermittent problem in a critical part of their infrastructure. It will be in 2019.2.1 - I’m not sure when that will be out, but it should be within a week or two. If either of these problems affect you, the best thing is not to upgrade IntelliJ for the moment.

Disclaimers aside, on the bright side there are several new features. Cursive will now give you the option to download an archive of the ClojureDocs information, and if you do so this will be used to show examples, notes and see-alsos in the documentation popups. This is documented here. You’ll be prompted to update the archive if it becomes more than 30 days out of date, and you can update it at any time at Preferences | Languages & Frameworks | Clojure.

Also new, when pasting HTML either copied from within IntelliJ or from some external source, Cursive will offer to convert it to hiccup for you when pasting. There’s also new support for the EnvFile IntelliJ plugin, which allows environment variables to be managed in external files such as .env. Environment variables can now also be specified for lein task run configurations. There’s also a fix to a newish flag on the run configs which needs to be set to allow multiple copies of e.g. a REPL to be run from a single config.

A while ago, I made a change to allow keywords to be associated with definitions. Previously keywords had no definition, but simply came into existence on first use. But several frameworks define entities using keyword identifiers - spec and re-frame both do this. So I added the concept of keyword definitions, but the implementation wasn’t entirely successful. Cursive would then treat keywords used in these contexts more like vars, but it wasn’t obvious when that change happened and it was very confusing. It also led to things like Find Usages and Rename behaving differently when keywords were used in the two contexts (as a definition, and as a standard keyword in e.g. destructuring). In this release I’ve modified how this works - keywords now work as they did previously, but you can still navigate to the definitions if they exist and they still show up in the structure view as you would expect. As part of this, there’s also a fix to another annoying keyword navigation issue where you couldn’t navigate from CLJ or CLJS files to keyword definitions in CLJC files.

The new error messages in Clojure 1.10 are also now clickable in the REPL, and there’s stub generation support for Datomic Ions.

There are also many bug fixes. There are various fixes to formatting which would break code under parinfer. The lein support will now use 2.9.1, the latest version. There are also numerous fixes to the deps support when using tools.deps directly as opposed to using the CLI tools, which mostly helps Windows users.

Since 2019.2 is now released, 1.8.2 is the last version of Cursive with support for IntelliJ 2017.1 and 2017.2.

Here are the issues:

Pasting and converting HTML to Hiccup loses contents of <style> and <script> tags #2171
Resolve :extra-deps under aliases to be part of a project #2164
“Allow running in parallel” option in run configs defaults to false and doesn’t persist #2162
deps.edn alias overrides from ~/.clojure/deps.edn fail if they contain ‘/’ #2161
Add support for EnvFile plugin for env var management #2160
Support for Leiningen 2.9.1? #2158
Add stubs support for datomic ions #2156
deps.edn with metadata does not import #2155
Allow pasting HTML code into hiccup #2154
When using t.d.a directly for Deps support, the configured IntelliJ proxy should be obeyed #2150
Allow user to specify Maven repo to use when using t.d.a directly for Deps support #2149
Deps defaults to Clojure 1.9.0 when using t.d.a directly #2148
Make new error messages in Clojure 1.10 clickable #2142
Test result / diff not showing #2123
Code reformat with Parinfer breaks code: def with metadata #2044
Parinfer is confused when functions are indirectly referenced #2027
Add option to set environment variables in leiningen run config #1953
Namespaced keyword “Navigate to Declaration” and “Find Usages” do not work outside of CLJC files #1913
Not all usages of namespaced keywords are found #1908
When hover on showing code examples for built-in functions on clojuredocs.org #1783
metadata map followed by newline indents incorrectly #796

Cheers,
Colin

Reynald Borer

unread,
Jul 25, 2019, 10:14:59 AM7/25/19
to cur...@googlegroups.com

Hi Colin,

Thanks for the update!

I just bumped my IntelliJ to 2019.2 with cursive 1.8.2 and am not experiencing an issue 😭. At startup everything looks fine but after 2-3 minutes, I get multiple times the red error message:

Unable to save plugin settings: The plugin com.cursiveclojure.cursive failed to save settings and has been disabled. Please restart IntelliJ IDEA

Then if I try to open any not already open clojure source code file, I get the following stacktrace:

java.lang.IllegalArgumentException: Area already instantiated for: ProjectDefault (Template) Project
at com.intellij.openapi.extensions.Extensions.instantiateArea(Extensions.java:138)
at com.intellij.openapi.project.impl.ProjectImpl.bootstrapPicoContainer(ProjectImpl.java:148)
at com.intellij.openapi.project.impl.DefaultProject$1$1.init(DefaultProject.java:74)
at com.intellij.openapi.project.impl.DefaultProject$1.init(DefaultProject.java:104)
at com.intellij.openapi.project.impl.DefaultProjectTimed.get(DefaultProjectTimed.java:34)
at com.intellij.openapi.project.impl.DefaultProject.getDelegate(DefaultProject.java:131)
at com.intellij.openapi.project.impl.DefaultProject.getComponent(DefaultProject.java:216)
at com.intellij.openapi.wm.ToolWindowManager.getInstance(ToolWindowManager.java:26)
at net.orfjackal.sbt.plugin.SbtRunnerComponent.unregisterToolWindow(SbtRunnerComponent.java:117)
at net.orfjackal.sbt.plugin.SbtRunnerComponent.disposeComponent(SbtRunnerComponent.java:98)
at com.intellij.openapi.components.impl.ComponentManagerImpl.disposeComponents(ComponentManagerImpl.java:169)
at com.intellij.openapi.project.impl.ProjectImpl.dispose(ProjectImpl.java:330)
at com.intellij.openapi.util.Disposer$1.execute(Disposer.java:47)
at com.intellij.openapi.util.Disposer$1.execute(Disposer.java:43)
at com.intellij.openapi.util.objectTree.ObjectNode$1.execute(ObjectNode.java:135)
at com.intellij.openapi.util.objectTree.ObjectNode$1.execute(ObjectNode.java:104)
at com.intellij.openapi.util.objectTree.ObjectTree.executeActionWithRecursiveGuard(ObjectTree.java:194)
at com.intellij.openapi.util.objectTree.ObjectNode.execute(ObjectNode.java:104)
at com.intellij.openapi.util.objectTree.ObjectTree.executeAll(ObjectTree.java:142)
at com.intellij.openapi.util.Disposer.dispose(Disposer.java:136)
at com.intellij.openapi.util.Disposer.dispose(Disposer.java:132)
at com.intellij.util.Timed.dispose(Timed.java:41)
[...]

When I restart IntelliJ the plugin is disabled so I have to enable it again, restart, wait on project indexing to finish, and then the same error happens after a few minutes.

I've tried to invalidate the cache without luck. Also, it's happening on 2 different projects so my guess is that it is not project specific.

Is this issue already known? What kind of information can I provide to help its diagnostic?

Cheers,
Reynald


--
You received this message because you are subscribed to the Google Groups "Cursive" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cursive+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cursive/675833472.1.1564014881300.JavaMail.colin%40Colin-Flemings-MacBook-Pro-4.local.

dan young

unread,
Jul 25, 2019, 10:04:33 PM7/25/19
to cur...@googlegroups.com
Hello,

I tried to upgrade IntelliJ to 2019.2 and the latest Cursive plugin but I get the following error (see attached screen shot) when trying to import an existing deps project (works in previous IntelliJ/Cursive version).  I also noticed when setting up a REPL, and I select the clojure.main under "Which type of REPL to run", at the bottom of the panel a Run Configuration Error comes up stating "No modules containing clojure.main found".  I there a different way to set this up now with Intellij 2019.2?

Regards,

Dano


--
Screen Shot 2019-07-25 at 7.37.56 PM.png
Screen Shot 2019-07-25 at 7.53.54 PM.png

Colin Fleming

unread,
Jul 26, 2019, 1:23:50 AM7/26/19
to Cursive Group
No, sadly this is https://github.com/cursive-ide/cursive/issues/2209, which is actually a platform issue: https://youtrack.jetbrains.com/issue/IDEA-218954. Unfortunately deps support is pretty much totally broken on 2019.2 - I recommend staying on 2019.1 or even better 2018.3 until 2019.2.1 is out, which will hopefully fix all this.

Sorry for the hassle!

Cheers,
Colin


Attachments:
  • Screen Shot 2019-07-25 at 7.37.56 PM.png
  • Screen Shot 2019-07-25 at 7.53.54 PM.png

Tom

unread,
Jul 26, 2019, 2:23:20 AM7/26/19
to Cursive
Hi Colin,

I’m on a fairly old IntelliJ and I guess it’s time to upgrade. Given there are issues with some versions, can you recommend an IntelliJ version for maximum stability?

Thanks

Tom

Colin Fleming

unread,
Jul 26, 2019, 2:33:10 AM7/26/19
to Cursive Group
Hi Tom,

Yes, 2018.3 is the most stable version right now. I'm optimistic that the serious issues will be fixed in 2019.2.1, but we'll have to see. All the current serious bugs were introduced in 2019.x.

Cheers,
Colin
> --
> You received this message because you are subscribed to the Google
> Groups "Cursive" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to cursive+u...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/cursive/cf6f2cfd-b0f9-4ede-8b24-539ed9a85f99%40googlegroups.com.
>

dan young

unread,
Jul 26, 2019, 8:02:38 AM7/26/19
to cur...@googlegroups.com
Thank you Colin. I'll revert back to previous versions.

Regards

Dano

Nick Jones

unread,
Jul 28, 2019, 3:22:08 AM7/28/19
to Cursive
Thanks Colin,

I like the Clojure docs inline examples. Nice one.
Reply all
Reply to author
Forward
0 new messages