summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndres Pipicello <andres.pipicello@olx.com>2019-05-26 10:09:55 -0300
committerTobias Roeser <le.petit.fou@web.de>2019-06-28 08:37:39 +0200
commitb80f85b63128bdd1833f556cdf34859d0ce35da3 (patch)
treed73bcc4a5990b9a127b487a7088390432a73f2a5
parent8b77cf6cec10d5f573f56283eca4302029b49d42 (diff)
downloadmill-b80f85b63128bdd1833f556cdf34859d0ce35da3.tar.gz
mill-b80f85b63128bdd1833f556cdf34859d0ce35da3.tar.bz2
mill-b80f85b63128bdd1833f556cdf34859d0ce35da3.zip
It seems that simply using the provided evaluator fixes https://github.com/lihaoyi/mill/issues/352
-rwxr-xr-xscalalib/src/GenIdeaImpl.scala7
1 files changed, 3 insertions, 4 deletions
diff --git a/scalalib/src/GenIdeaImpl.scala b/scalalib/src/GenIdeaImpl.scala
index a9eefc65..75b88513 100755
--- a/scalalib/src/GenIdeaImpl.scala
+++ b/scalalib/src/GenIdeaImpl.scala
@@ -19,6 +19,7 @@ object GenIdea extends ExternalModule {
def idea(ev: Evaluator) = T.command{
mill.scalalib.GenIdeaImpl(
+ ev,
implicitly,
ev.rootModule,
ev.rootModule.millDiscover
@@ -31,7 +32,8 @@ object GenIdea extends ExternalModule {
object GenIdeaImpl {
- def apply(ctx: Log with Home,
+ def apply(evaluator: Evaluator,
+ ctx: Log with Home,
rootModule: BaseModule,
discover: Discover[_]): Unit = {
val pp = new scala.xml.PrettyPrinter(999, 4)
@@ -42,9 +44,6 @@ object GenIdeaImpl {
os.remove.all(os.pwd/".idea"/"scala_compiler.xml")
os.remove.all(os.pwd/".idea_modules")
-
- val evaluator = new Evaluator(ctx.home, os.pwd / 'out, os.pwd / 'out, rootModule, ctx.log)
-
for((relPath, xml) <- xmlFileLayout(evaluator, rootModule, jdkInfo, Some(ctx))){
os.write.over(os.pwd/relPath, pp.format(xml), createFolders = true)
}