maravillas / lein-multi

A Leiningen plugin for testing against multiple versions of Clojure at once.
33 stars 4 forks source link

Multi-Deps should have a shared-dependency option #3

Closed sritchie closed 12 years ago

sritchie commented 12 years ago

I find that for projects with a large number of dependencies I sometimes want to change only the clojure version and keep everything else the same. Right now I've just repeated a number of dependencies: https://github.com/nathanmarz/cascalog/blob/master/project.clj.

Would it be possible to have a set of shared dependencies that are merged in with every other multi-deps set? Something like

(defproject cascalog/cascalog "1.8.4"
  :dependencies [...elided...]
  :dev-dependencies [[swank-clojure "1.4.0-SNAPSHOT"]
                     [org.apache.hadoop/hadoop-core "0.20.2-dev"]
                     [lein-multi "1.1.0-SNAPSHOT"]]
  :multi-deps {:default [[cascading/cascading-core "1.2.4"
                          :exclusions [org.codehaus.janino/janino
                                       thirdparty/jgrapht-jdk1.6
                                       riffle/riffle]]
                         [thirdparty/jgrapht-jdk1.6 "0.8.1"]
                         [riffle/riffle "0.1-dev"]
                         [log4j/log4j "1.2.16"]
                         [hadoop-util "0.2.4"]]
               "1.2.0" [[org.clojure/clojure "1.2.0"]]
               "1.2.1" [[org.clojure/clojure "1.2.1"]]
               "1.4.0" [[org.clojure/clojure "1.4.0-alpha5"]]})

Thanks! Sam

maravillas commented 12 years ago

Yeah, that sounds like a great idea. I'll try to get this knocked out sometime soon.