Skip to content

Commit

Permalink
Address bin compat issues introduced in com-lihaoyi#4145
Browse files Browse the repository at this point in the history
  • Loading branch information
alexarchambault committed Jan 20, 2025
1 parent 9815c35 commit 45c655b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 19 deletions.
8 changes: 0 additions & 8 deletions build.mill
Original file line number Diff line number Diff line change
Expand Up @@ -596,14 +596,6 @@ trait MillStableScalaModule extends MillPublishScalaModule with Mima {
"mill.main.MainModule.mill$define$BaseModule0$_setter_$evalWatchedValues_="
),

// Overrides added for new methods, ought to be safe
ProblemFilter.exclude[ReversedMissingMethodProblem](
"mill.scalalib.JavaModule.mill$scalalib$JavaModule$$super$internalRepositories"
),
ProblemFilter.exclude[ReversedMissingMethodProblem](
"mill.scalanativelib.ScalaNativeModule.mill$scalanativelib$ScalaNativeModule$$super$coursierProject"
),

// https://github.com/com-lihaoyi/mill/pull/3503
ProblemFilter.exclude[ReversedMissingMethodProblem](
"mill.scalalib.ScalaModule#ScalaTests.mill$scalalib$ScalaModule$ScalaTests$$super$mandatoryScalacOptions"
Expand Down
23 changes: 13 additions & 10 deletions scalalib/src/mill/scalalib/JavaModule.scala
Original file line number Diff line number Diff line change
Expand Up @@ -438,15 +438,7 @@ trait JavaModule
JavaModule.internalVersion
).withConfiguration(cs.Configuration.compile)

/**
* The `coursier.Project` corresponding to this `JavaModule`.
*
* This provides details about this module to the coursier resolver (details such as
* dependencies, BOM dependencies, dependency management, etc.). Beyond more general
* resolution parameters (such as artifact types, etc.), this should be the only way
* we provide details about this module to coursier.
*/
def coursierProject: Task[cs.Project] = Task {
private[mill] def javaModuleCoursierProject: Task[cs.Project] = Task {

// Tells coursier that if something depends on a given scope of ours, we should also
// pull other scopes of our own dependencies.
Expand Down Expand Up @@ -567,6 +559,17 @@ trait JavaModule
)
}

/**
* The `coursier.Project` corresponding to this `JavaModule`.
*
* This provides details about this module to the coursier resolver (details such as
* dependencies, BOM dependencies, dependency management, etc.). Beyond more general
* resolution parameters (such as artifact types, etc.), this should be the only way
* we provide details about this module to coursier.
*/
def coursierProject: Task[cs.Project] =
javaModuleCoursierProject

/**
* Coursier project of this module and those of all its transitive module dependencies
*/
Expand Down Expand Up @@ -677,7 +680,7 @@ trait JavaModule
* doing.
*/
def internalRepositories: Task[Seq[cs.Repository]] = Task.Anon {
super.internalRepositories() ++ Seq(internalDependenciesRepository())
Seq(internalDependenciesRepository())
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,9 @@ trait ScalaNativeModule extends ScalaModule { outer =>
.toSet
)

val proj = super.coursierProject()
// could be a problem if
// javaModuleCoursierProject ne super.coursierProject
val proj = javaModuleCoursierProject()

proj.withDependencies(
proj.dependencies.map {
Expand Down

0 comments on commit 45c655b

Please sign in to comment.