Skip to content

Commit

Permalink
Fix GenIdeaTests by making the Log context Option[]al
Browse files Browse the repository at this point in the history
  • Loading branch information
gehnaphore committed Dec 18, 2018
1 parent bf2fe66 commit 5230d01
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions scalalib/src/GenIdeaImpl.scala
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ object GenIdeaImpl {

val evaluator = new Evaluator(ctx.home, os.pwd / 'out, os.pwd / 'out, rootModule, ctx.log)

for((relPath, xml) <- xmlFileLayout(evaluator, rootModule, jdkInfo, ctx)){
for((relPath, xml) <- xmlFileLayout(evaluator, rootModule, jdkInfo, Some(ctx))){
os.write.over(os.pwd/relPath, pp.format(xml), createFolders = true)
}
}
Expand All @@ -61,7 +61,7 @@ object GenIdeaImpl {
def xmlFileLayout(evaluator: Evaluator,
rootModule: mill.Module,
jdkInfo: (String,String),
ctx: Log,
ctx: Option[Log],
fetchMillModules: Boolean = true): Seq[(os.RelPath, scala.xml.Node)] = {

val modules = rootModule.millInternal.segmentsToModules.values
Expand All @@ -82,7 +82,7 @@ object GenIdeaImpl {
yield ivy"com.lihaoyi::mill-$name:${sys.props("MILL_VERSION")}",
false,
None,
Some(ctx)
ctx
)
res.items.toList.map(_.path)
}
Expand Down
2 changes: 1 addition & 1 deletion scalalib/test/src/GenIdeaTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ object GenIdeaTests extends TestSuite {
val layout = GenIdeaImpl.xmlFileLayout(
helloWorldEvaluator.evaluator,
HelloWorld,
("JDK_1_8", "1.8 (1)"), fetchMillModules = false)
("JDK_1_8", "1.8 (1)"), None, fetchMillModules = false)
for((relPath, xml) <- layout){
os.write.over(millSourcePath/ "generated"/ relPath, pp.format(xml), createFolders = true)
}
Expand Down

0 comments on commit 5230d01

Please sign in to comment.