Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
lihaoyi committed May 13, 2023
1 parent 3d157a4 commit e55f5b2
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions runner/src/mill/runner/MillBuildRootModule.scala
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,23 @@ class MillBuildRootModule()(implicit

override def millSourcePath = millBuildRootModuleInfo.projectRoot / os.up / "mill-build"

override def resolveDeps(
deps: Task[Agg[BoundDep]],
sources: Boolean = false
): Task[Agg[PathRef]] =
T.task {
if (sources == true) super.resolveDeps(deps, true)()
else {
// We need to resolve the sources to make GenIdeaExtendedTests pass,
// because those do not call `resolveDeps` explicitly for build file
// `import $ivy`s but instead rely on the deps that are resolved as
// part of the bootstrapping process. We thus need to make sure
// bootstrapping the rootModule ends up putting the sources on disk
val unused = super.resolveDeps(deps, true)()
super.resolveDeps(deps, false)()
}
}

override def scalaVersion = "2.13.10"

def scriptSources = T.sources {
Expand Down

0 comments on commit e55f5b2

Please sign in to comment.