Add extra check

The size == 1 check just below is required for scripted to work fine.
(The first module report must correspond to the passed dependency for
scripted to find the sbt launcher JAR.)

It seems under some conditions, the sbt launcher dependency ends up
being duplicated (it's already duplicated in the allDependencies task,
that should be set by sbt). This in turn makes the check fail, and makes
scripted not find the sbt launcher. This happens with
playframework/interplay at commit d782b75.

The call to distinct circumvents that case.
This commit is contained in:
Alexandre Archambault 2019-03-04 12:12:41 +01:00
parent 75b08dc7ff
commit dab476ab93
1 changed files with 5 additions and 1 deletions

View File

@ -218,7 +218,11 @@ object ToSbt {
val configReports = configs.map {
case (config, extends0) =>
val configDeps = extends0.toSeq.sortBy(_.value).flatMap(configDependencies.getOrElse(_, Nil))
val configDeps = extends0
.toSeq
.sortBy(_.value)
.flatMap(configDependencies.getOrElse(_, Nil))
.distinct
val subRes = resolutions(config).subset(configDeps)
val reports = ToSbt.moduleReports(