-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose more in RichUpdateReport #84
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor nitpicks.
@@ -15,10 +18,10 @@ final class RichUpdateReport(report: UpdateReport) { | |||
import DependencyFilter._ | |||
|
|||
/** Obtains all successfully retrieved files in all configurations and modules. */ | |||
private[sbt] def allFiles: Seq[File] = matching(DependencyFilter.allPass) | |||
def allFiles: Seq[File] = matching(DependencyFilter.allPass) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use Vectors.
|
||
/** Obtains all successfully retrieved files in configurations, modules, and artifacts matching the specified filter. */ | ||
private[sbt] def matching(f: DependencyFilter): Seq[File] = select0(f).distinct | ||
def matching(f: DependencyFilter): Seq[File] = select0(f).distinct |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same return Vector.
@@ -50,11 +63,19 @@ final class RichUpdateReport(report: UpdateReport) { | |||
.withMissingArtifacts(modReport.missingArtifacts) | |||
} | |||
|
|||
private[sbt] def toSeq: Seq[(String, ModuleID, Artifact, File)] = | |||
for (confReport <- report.configurations; modReport <- confReport.modules; (artifact, file) <- modReport.artifacts) yield (confReport.configuration, modReport.module, artifact, file) | |||
def toSeq: Seq[(String, ModuleID, Artifact, File)] = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
toVector
and then add toSeq
that calls toVector
.
|
||
private[sbt] def allMissing: Seq[(String, ModuleID, Artifact)] = | ||
for (confReport <- report.configurations; modReport <- confReport.modules; artifact <- modReport.missingArtifacts) yield (confReport.configuration, modReport.module, artifact) | ||
def allMissing: Seq[(String, ModuleID, Artifact)] = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same.
(artifact, file) <- mReport.artifacts | ||
if f(cReport.configuration, mReport.module, artifact) | ||
} yield { | ||
if (file == null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should either use Option(file).orElse { ... }
or put { .. }
around sys.error
.
Fixes #83