diff options
author | gehnaphore <geh@georgeandjulia.com> | 2018-12-19 23:41:31 -0800 |
---|---|---|
committer | Tobias Roeser <le.petit.fou@web.de> | 2018-12-20 08:41:31 +0100 |
commit | 056cd88f77d09ad7237933a38d441862501d8739 (patch) | |
tree | f5d3a2ac74476d11472fffcd98f678c6b6a322b7 /scalalib/src/GenIdeaImpl.scala | |
parent | 2752dcffae3765c56dca98b11a6a32318530e961 (diff) | |
download | mill-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.scala | 8 |
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) } |