mirror of https://github.com/sbt/sbt.git
Dummy refacto / fix
This commit is contained in:
parent
dbd602d5a8
commit
61eec1ef90
|
|
@ -7,6 +7,11 @@ sealed abstract class FileError(
|
|||
val message: String
|
||||
) extends Product with Serializable {
|
||||
def describe: String = s"${`type`}: $message"
|
||||
|
||||
final def notFound: Boolean = this match {
|
||||
case _: FileError.NotFound => true
|
||||
case _ => false
|
||||
}
|
||||
}
|
||||
|
||||
object FileError {
|
||||
|
|
|
|||
|
|
@ -352,7 +352,8 @@ object Tasks {
|
|||
project: Project,
|
||||
resolution: Map[Set[String], Resolution],
|
||||
withClassifiers: Boolean,
|
||||
sbtClassifiers: Boolean
|
||||
sbtClassifiers: Boolean,
|
||||
ignoreArtifactErrors: Boolean
|
||||
)
|
||||
|
||||
private val resolutionsCache = new mutable.HashMap[ResolutionCacheKey, Map[Set[String], Resolution]]
|
||||
|
|
@ -1142,20 +1143,12 @@ object Tasks {
|
|||
artifact -> file
|
||||
}
|
||||
|
||||
val (ignoredArtifactErrors, artifactErrors) = artifactFilesOrErrors0
|
||||
val artifactErrors = artifactFilesOrErrors0
|
||||
.toVector
|
||||
.collect {
|
||||
case (a, -\/(err)) =>
|
||||
case (a, -\/(err)) if !a.isOptional || !err.notFound =>
|
||||
a -> err
|
||||
}
|
||||
.partition {
|
||||
case (a, err) =>
|
||||
val notFound = err match {
|
||||
case _: FileError.NotFound => true
|
||||
case _ => false
|
||||
}
|
||||
a.isOptional && notFound
|
||||
}
|
||||
|
||||
if (artifactErrors.nonEmpty) {
|
||||
val error = ResolutionError.DownloadErrors(artifactErrors.map(_._2))
|
||||
|
|
@ -1194,7 +1187,8 @@ object Tasks {
|
|||
currentProject,
|
||||
res,
|
||||
withClassifiers,
|
||||
sbtClassifiers
|
||||
sbtClassifiers,
|
||||
ignoreArtifactErrors
|
||||
),
|
||||
report
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue