summaryrefslogtreecommitdiff
path: root/scalalib/src/GenIdeaImpl.scala
diff options
context:
space:
mode:
authorgehnaphore <geh@georgeandjulia.com>2018-12-19 23:41:31 -0800
committerTobias Roeser <le.petit.fou@web.de>2018-12-20 08:41:31 +0100
commit056cd88f77d09ad7237933a38d441862501d8739 (patch)
treef5d3a2ac74476d11472fffcd98f678c6b6a322b7 /scalalib/src/GenIdeaImpl.scala
parent2752dcffae3765c56dca98b11a6a32318530e961 (diff)
downloadmill-056cd88f77d09ad7237933a38d441862501d8739.tar.gz
mill-056cd88f77d09ad7237933a38d441862501d8739.tar.bz2
mill-056cd88f77d09ad7237933a38d441862501d8739.zip
Avoid unnecessary dependency downloading by providing fetches per cache policy (#494)
* Avoid unnecessary dependency downloading by providing fetches per cache policy; add ticker logging when they are downloading * Fix GenIdeaTests by making the Log context Option[]al * Add some comments * Rebase and resolve
Diffstat (limited to 'scalalib/src/GenIdeaImpl.scala')
-rw-r--r--scalalib/src/GenIdeaImpl.scala8
1 files changed, 6 insertions, 2 deletions
diff --git a/scalalib/src/GenIdeaImpl.scala b/scalalib/src/GenIdeaImpl.scala
index b8f9d35e..261a83a9 100644
--- a/scalalib/src/GenIdeaImpl.scala
+++ b/scalalib/src/GenIdeaImpl.scala
@@ -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)){
+ for((relPath, xml) <- xmlFileLayout(evaluator, rootModule, jdkInfo, Some(ctx))){
os.write.over(os.pwd/relPath, pp.format(xml), createFolders = true)
}
}
@@ -61,6 +61,7 @@ object GenIdeaImpl {
def xmlFileLayout(evaluator: Evaluator,
rootModule: mill.Module,
jdkInfo: (String,String),
+ ctx: Option[Log],
fetchMillModules: Boolean = true): Seq[(os.RelPath, scala.xml.Node)] = {
val modules = rootModule.millInternal.segmentsToModules.values
@@ -78,7 +79,10 @@ object GenIdeaImpl {
repos.toList,
Lib.depToDependency(_, "2.12.4", ""),
for(name <- artifactNames)
- yield ivy"com.lihaoyi::mill-$name:${sys.props("MILL_VERSION")}"
+ yield ivy"com.lihaoyi::mill-$name:${sys.props("MILL_VERSION")}",
+ false,
+ None,
+ ctx
)
res.items.toList.map(_.path)
}