pomegranate icon indicating copy to clipboard operation
pomegranate copied to clipboard

Managed coordinates force "compile" scope

Open c2nes opened this issue 5 years ago • 0 comments

In cemerick.pomegranate.aether/dependency the dependency scope is defaulted to "compile". I think this is correct for regular dependencies, but for managed dependencies this forces the scope for the dependency to be managed. For consistency with Maven, I think scope should default to "" for managed coordinates.

Here's a few examples with Leiningen and lein with-profile -base deps :tree,

(defproject test "0-SNAPSHOT"
  :profiles {:dev {:dependencies [[clj-time "0.14.0"]]}})

;; [clj-time "0.14.0" :scope "test"]
;;   [joda-time "2.9.7" :scope "test"]
(defproject test "0-SNAPSHOT"
  :managed-dependencies [[joda-time "2.9.7"]]
  :profiles {:dev {:dependencies [[clj-time "0.14.0"]]}})

;; [clj-time "0.14.0" :scope "test"]
;;   [joda-time "2.9.7"]
(defproject test "0-SNAPSHOT"
  :managed-dependencies [[joda-time "2.9.7" :scope ""]]
  :profiles {:dev {:dependencies [[clj-time "0.14.0"]]}})

;; [clj-time "0.14.0" :scope "test"]
;;   [joda-time "2.9.7" :scope "test"]

c2nes avatar Feb 24 '20 17:02 c2nes