Skip to content

Commit

Permalink
Rename {all,extra}BomDeps to {all,extra}BomIvyDeps
Browse files Browse the repository at this point in the history
  • Loading branch information
alexarchambault committed Dec 11, 2024
1 parent 42af383 commit 6bbbaca
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion build.mill
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ trait MillStableScalaModule extends MillPublishScalaModule with Mima {
"mill.scalalib.JavaModule.mill$scalalib$JavaModule$$super$runMain"
),
// Added overrides for a new targets, should be safe
ProblemFilter.exclude[ReversedMissingMethodProblem]("mill.scalalib.JavaModule#JavaModuleTests.mill$scalalib$JavaModule$JavaModuleTests$$super$extraBomDeps"),
ProblemFilter.exclude[ReversedMissingMethodProblem]("mill.scalalib.JavaModule#JavaModuleTests.mill$scalalib$JavaModule$JavaModuleTests$$super$extraBomIvyDeps"),
ProblemFilter.exclude[ReversedMissingMethodProblem]("mill.scalalib.JavaModule#JavaModuleTests.mill$scalalib$JavaModule$JavaModuleTests$$super$extraDepManagement"),
// Terminal is sealed, not sure why MIMA still complains
ProblemFilter.exclude[ReversedMissingMethodProblem]("mill.eval.Terminal.task"),
Expand Down
16 changes: 8 additions & 8 deletions scalalib/src/mill/scalalib/JavaModule.scala
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ trait JavaModule
}
}

override def extraBomDeps = Task.Anon[Agg[BomDependency]] {
super.extraBomDeps() ++
outer.allBomDeps().map(_.withConfig(Configuration.test))
override def extraBomIvyDeps = Task.Anon[Agg[BomDependency]] {
super.extraBomIvyDeps() ++
outer.allBomIvyDeps().map(_.withConfig(Configuration.test))
}
override def extraDepManagement = Task.Anon[Agg[Dep]] {
super.extraDepManagement() ++
Expand Down Expand Up @@ -174,7 +174,7 @@ trait JavaModule
*/
def bomIvyDeps: T[Agg[Dep]] = Task { Agg.empty[Dep] }

def allBomDeps: Task[Agg[BomDependency]] = Task.Anon {
def allBomIvyDeps: Task[Agg[BomDependency]] = Task.Anon {
val modVerOrMalformed =
bomIvyDeps().map(bindDependency()).map { bomDep =>
val fromModVer = coursier.core.Dependency(bomDep.dep.module, bomDep.dep.version)
Expand Down Expand Up @@ -207,7 +207,7 @@ trait JavaModule
* modules, while ensuring test dependencies of the BOM are taken into account too
* in the test module.
*/
def extraBomDeps: Task[Agg[BomDependency]] = Task.Anon { Agg.empty[BomDependency] }
def extraBomIvyDeps: Task[Agg[BomDependency]] = Task.Anon { Agg.empty[BomDependency] }

/**
* Dependency management entries that are not meant to be overridden or changed by users.
Expand Down Expand Up @@ -511,7 +511,7 @@ trait JavaModule
overrideVersions: Boolean = false
): Task[coursier.core.Dependency => coursier.core.Dependency] = Task.Anon {
val bomDeps0 =
allBomDeps().toSeq.map(_.withConfig(Configuration.compile)) ++ extraBomDeps().toSeq
allBomIvyDeps().toSeq.map(_.withConfig(Configuration.compile)) ++ extraBomIvyDeps().toSeq
val depMgmt = processedDependencyManagement(
(extraDepManagement().toSeq ++ depManagement().toSeq)
.map(bindDependency())
Expand All @@ -533,7 +533,7 @@ trait JavaModule
def processCompileDependency(
overrideVersions: Boolean = false
): Task[coursier.core.Dependency => coursier.core.Dependency] = Task.Anon {
val bomDeps0 = allBomDeps().toSeq.map(_.withConfig(Configuration.provided))
val bomDeps0 = allBomIvyDeps().toSeq.map(_.withConfig(Configuration.provided))
val depMgmt = processedDependencyManagement(
(compileDepManagement().toSeq ++ extraDepManagement().toSeq ++ depManagement().toSeq)
.map(bindDependency())
Expand All @@ -555,7 +555,7 @@ trait JavaModule
def processRunDependency(
overrideVersions: Boolean = false
): Task[coursier.core.Dependency => coursier.core.Dependency] = Task.Anon {
val bomDeps0 = allBomDeps().toSeq.map(_.withConfig(Configuration.defaultCompile))
val bomDeps0 = allBomIvyDeps().toSeq.map(_.withConfig(Configuration.defaultCompile))
val depMgmt = processedDependencyManagement(
(runDepManagement().toSeq ++ depManagement())
.map(bindDependency())
Expand Down
4 changes: 2 additions & 2 deletions scalalib/src/mill/scalalib/PublishModule.scala
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ trait PublishModule extends JavaModule { outer =>
val (processedDeps, depMgmt) = defaultResolver().processDeps(
processedRunIvyDeps() ++ processedIvyDeps(),
resolutionParams = resolutionParams(),
boms =
allBomDeps().toSeq.map(_.withConfig(Configuration.defaultCompile)) ++ extraBomDeps().toSeq
boms = allBomIvyDeps().toSeq.map(_.withConfig(Configuration.defaultCompile)) ++
extraBomIvyDeps().toSeq
)
(processedDeps.map(_.moduleVersion).toMap, depMgmt)
}
Expand Down

0 comments on commit 6bbbaca

Please sign in to comment.