Cursive 1.8.0-eap2 is out. The main new feature is support for managing project dependencies with Clojure’s new deps.edn. It’s still pretty experimental so feedback is very welcome. It’s using a new-ish API for build system integration in IntelliJ which I’m not familiar with and which has some funky corners, so a total re-write of the IntelliJ integration part is still a possibility. In that case, deps projects would have to be re-imported, it won’t be possible to provide a migration. Deps itself is also a little unconventional and has some features which go against some things which are fairly ingrained into IntelliJ, so the integration may have to change significantly if they turn out to be a problem.
Here’s a list of potential gotchas or problems:
When creating inter-project dependencies using :local/root, Cursive will create a library rather than a module dependency. This is because deps is unusual in how things like source paths are propagated from dependent projects to the root ones. Since a build integration would normally create a module dependency I’ve had to fix some bugs relating to that, but there may be more.
Deps also has no concept of the name of a project in the deps file, so there’s nothing for Cursive to be able to derive a module name from. Currently it just uses the name of the containing directory, but since module names must be unique this will be a problem if you have something like server/api and client/api. Suggestions for how to work around this are welcome.
Similarly, the only reasonable thing to call the library used for a :local/root dep is the name of the symbol used to declare it in the deps.edn file. But if two separate projects reference the same dependency using different names then two separate libraries will be created pointing to the same sources. I’m not sure if this will create issues or not, at best it’s ugly.
The IntelliJ API has a concept of “linked projects”, which are projects managed via build files which you’ve registered with the IDE. The lein integration works like the Maven integration does, i.e. you need to register all the project.clj files which are part of your project. This new API only supports systems more like the Gradle integration which is based on the same API I’m using. Here, you only register the root project with the IDE, and the subprojects (:local/root dependencies in deps) are discovered and added automatically. This is bound to cause confusion for those coming from using lein.
Important tl;dr of the above paragraph: when using deps, only import your root projects, not libraries which other projects reference via :local/root.
This integration requires you to have the CLI tools installed, and it uses them for some of its functionality. Unfortunately this means that it can’t be used on Windows yet, although I have a plan to fix that.
Cursive will try to create tasks for the various aliases that are registered with runtime options in deps files. However the interface for working with them is weird and I haven’t investigated it yet. So things like running depstar and the like will probably not work via the IDE yet.
REPL support is currently limited to what was available previously - that’s next on my list to upgrade.
The integration should work similarly to the other integrations in IntelliJ, so hopefully it will all feel familiar. If not, let me know and I can explain.
In addition to deps support, there’s now an option to use double semicolons for line comments, for Emacs compatibility. It can be turned on using Editor->General->Smart Keys->Clojure->Use ;; for line comments.
Here are the issues:
--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/a52b9903-6dbc-4d25-ac0a-d8fc15baee74%40googlegroups.com.For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to a topic in the Google Groups "Cursive" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cursive/32tfBegzfVc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cursive+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cursive/1532344079.4154271.1449719728.31C3905B%40webmail.messagingengine.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cursive/CAMwuZb7kRZG%3D04VaQaV_36R6fvh4LqcWwOkkGEfRxqzcuWnRMA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cursive/1532672380.3142549.1454528056.1DD1C4FD%40webmail.messagingengine.com.