mirror of
https://github.com/sbt/sbt.git
synced 2026-08-22 14:17:13 +02:00
Remove wrongly purposed --scope option
Allow specifying scope (or configuration) for each dependency should be added instead.
This commit is contained in:
@@ -10,7 +10,6 @@ import scalaz.{ \/-, -\/ }
|
|||||||
import scalaz.concurrent.Task
|
import scalaz.concurrent.Task
|
||||||
|
|
||||||
case class Coursier(
|
case class Coursier(
|
||||||
scope: List[String],
|
|
||||||
keepOptional: Boolean,
|
keepOptional: Boolean,
|
||||||
fetch: Boolean,
|
fetch: Boolean,
|
||||||
@ExtraName("J") default: Boolean,
|
@ExtraName("J") default: Boolean,
|
||||||
@@ -31,11 +30,6 @@ case class Coursier(
|
|||||||
(if (quiet) 1 else 0)
|
(if (quiet) 1 else 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
val scopes0 =
|
|
||||||
if (scope.isEmpty) List(Scope.Compile, Scope.Runtime)
|
|
||||||
else scope.map(Parse.scope)
|
|
||||||
val scopes = scopes0.toSet
|
|
||||||
|
|
||||||
def fileRepr(f: File) = f.toString
|
def fileRepr(f: File) = f.toString
|
||||||
|
|
||||||
def println(s: String) = Console.err.println(s)
|
def println(s: String) = Console.err.println(s)
|
||||||
@@ -170,7 +164,7 @@ case class Coursier(
|
|||||||
|
|
||||||
val startRes = Resolution(
|
val startRes = Resolution(
|
||||||
deps.toSet,
|
deps.toSet,
|
||||||
filter = Some(dep => (keepOptional || !dep.optional) && scopes(dep.scope))
|
filter = Some(dep => keepOptional || !dep.optional)
|
||||||
)
|
)
|
||||||
|
|
||||||
val fetchQuiet = coursier.fetch(repositories)
|
val fetchQuiet = coursier.fetch(repositories)
|
||||||
|
|||||||
Reference in New Issue
Block a user