Skip to content

Commit

Permalink
Fix injection of mill build commands
Browse files Browse the repository at this point in the history
  • Loading branch information
WojciechMazur committed Sep 20, 2024
1 parent 46c8f61 commit 4b88225
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,16 +141,17 @@ class Scala3CommunityBuildMillAdapter(
)

def injectRootModuleRunCommand =
// def runCommunityBuild(_evaluator: _root_.mill.eval.Evaluator, scalaVersion: _root_.scala.Predef.String, configJson: _root_.scala.Predef.String, targets: _root_.scala.Predef.String*) = _root_.mill.T.command {
// def runCommunityBuild(_evaluator: _root_.mill.eval.Evaluator, scalaVersion: _root_.scala.Predef.String, projectDir: _root_.scala.Predef.String, configJson: _root_.scala.Predef.String, targets: _root_.scala.Predef.String*) = _root_.mill.T.command {
// implicit val ctx = MillCommunityBuild.Ctx(this, scalaVersion, _evaluator, _root_.mill.T.log)
// MillCommunityBuild.runBuild(configJson, targets)
// MillCommunityBuild.runBuild(configJson, projectDir, targets)
// }""".stripMargin
Defn.Def(Nil, Term.Name("runCommunityBuild"), Nil,
paramss = List(
List(
Term.Param(Nil, Term.Name("evaluator"), Some(Type.Select(Term.Select(Term.Select(Term.Name("_root_"), Term.Name("mill")), Term.Name("eval")), Type.Name("Evaluator"))), None),
Term.Param(Nil, Term.Name("scalaVersion"), Some(Type.Select(Term.Select(Term.Select(Term.Name("_root_"), Term.Name("scala")), Term.Name("Predef")), Type.Name("String"))), None),
Term.Param(Nil, Term.Name("configJson"), Some(Type.Select(Term.Select(Term.Select(Term.Name("_root_"), Term.Name("scala")), Term.Name("Predef")), Type.Name("String"))), None),
Term.Param(Nil, Term.Name("projectDir"), Some(Type.Select(Term.Select(Term.Select(Term.Name("_root_"), Term.Name("scala")), Term.Name("Predef")), Type.Name("String"))), None),
Term.Param(Nil, Term.Name("targets"), Some(Type.Repeated(Type.Select(Term.Select(Term.Select(Term.Name("_root_"), Term.Name("scala")), Term.Name("Predef")), Type.Name("String")))), None),
)
),
Expand All @@ -169,7 +170,7 @@ class Scala3CommunityBuildMillAdapter(
),
Term.Apply(
Term.Select(Term.Name("MillCommunityBuild"), Term.Name("runBuild")),
List(Term.Name("configJson"), Term.Name("targets"))
List(Term.Name("configJson"), Term.Name("projectDir"), Term.Name("targets"))
)
))
)
Expand Down

0 comments on commit 4b88225

Please sign in to comment.