clojure-emacs / enrich-classpath

Enriches Lein/deps.edn dependency trees with Java sources, JDK sources, javadocs, etc
Eclipse Public License 2.0
32 stars 9 forks source link

v2 plugin #23

Closed vemv closed 1 year ago

vemv commented 1 year ago

Introduces a new approach for the Lein plugin: now all what Enrich does is building a bespoke java command, using the Lein project map (including any modifications from profiles, other plugins, etc) as the basis.

This allows us to have a very precise control of classpath ordering, which Lein does not provide otherwise.

It's a similar approach to what we do for tools.deps. Except that we also launch an nrepl server, honoring Lein options. This relpaces lein repl :headless.

As a very nice side-effect, the resulting java invocation will involve just one JVM process, as opposed to the two JVMs that Lein traditionally involves.

We still need a JVM for calculating the java command. However that is amenable to caching - it's exactly what the official tools.deps CLI does. Could be done eventually.

n.b. this is alpha software atm - I'll release this only for private testing.