7 ms·
Leining is a very useful tool. Starting up Clojure indeed is noticeable. I wonder how much of the performance is due to Maven, and if gradle would do better. Gr
by bachback 12y ago
Leining is a very useful tool. Starting up Clojure indeed is noticeable. I wonder how much of the performance is due to Maven, and if gradle would do better. Gradle is a newer project with a custom DSL based on Groovy.
- wtetzner 12y agoNot sure what you mean? Leiningen is its own build tool, it isn't using Maven. I believe it uses the aether library for dependency management, but as far as I know that's all they have in common.
- robert_tweed 12y agoLeiningen uses Maven for everything internally, it just goes to some effort to hide it most of the time.
- weavejester 12y agoNo it doesn't. I don't know why people think this.
- kyllo 12y agoBecause it interoperates with Maven. It can fetch and install code from Maven repositories, can read and write a pom.xml file, and uses the same groupId/artifactId/version format for specifying dependencies. And it also depends on a few org.apache.maven packages. So without looking at the source it would be easy to mistake lein for a Clojure wrapper around mvn. But it's more like a Clojure implementation of a superset of Maven's functionality, I guess.
- robert_tweed 12y agoYou and I are definitely both correct about it being a dependency: it caused me some installation headaches. I may have misunderstood the docs about how deep of a dependency it is; I haven't read the source. Returning to the OP's point, given that it is a dependency, it's still possible there is some resulting startup overhead, but I couldn't say for sure without profiling it.
- kyllo 12y agoMy biggest headache with it was just figuring out how to tell it to use a local jar. It really wanted to fetch it from clojars or maven central but sometimes you just need to use a jar that's sitting on your hard disk. IIRC there's no standard way to do this and I had to create a local maven repo for lein to pull it from.
- technomancy 12y agoIt used to be true; the 1.x series used actual Maven code. But that was years ago.
- MrBuddyCasino 12y agoBesides, Gradle startup time is significantly slower than Maven, since bootstrapping Groovy is not a fast operation. So that would make things worse.
- vorg 12y agoReading between the lines in the Gradle docs, it looks like Gradle will ditch Groovy soon enough. Gradle 2 had almost no Groovy left in its own codebase, only was what was directly related to handling the Gradle DSL. No open source project's Gradle build script I've ever seen ever drops out of the DSL to use any of Groovy programming language, including Groovy's own build script. I suspect Gradleware will replace the Groovy with its own lightweight custom DSL parser soon enough.
- MrBuddyCasino 12y agoInteresting. I use it a bit, but would be content to use Java instead if that meant ditching the slow startup.
- pjmlp 12y agoI can barely wait for it, if that is indeed the case. Personally I like Ant a lot and can live with Maven. If it wasn't for Android Studio I wouldn't care 1 second for Gradle. It is just so painful slow for what is a JSON like DSL.