From 0c7792e6f417de59f78fba65d44d709b61927a6e Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Wed, 18 Sep 2024 17:56:52 +0200 Subject: [PATCH] ?? resolve workers too --- main/resolve/src/mill/resolve/Resolve.scala | 6 +++--- main/resolve/src/mill/resolve/ResolveCore.scala | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/main/resolve/src/mill/resolve/Resolve.scala b/main/resolve/src/mill/resolve/Resolve.scala index 09c0edc6590..4cc042df634 100644 --- a/main/resolve/src/mill/resolve/Resolve.scala +++ b/main/resolve/src/mill/resolve/Resolve.scala @@ -104,13 +104,13 @@ object Resolve { items.distinctBy(_.ctx.segments) } - private def instantiateTarget(r: Resolved.Target, p: Module): Either[String, Target[_]] = { + private def instantiateTarget(r: Resolved.Target, p: Module): Either[String, NamedTask[_]] = { val definition = Reflect - .reflect(p.getClass, classOf[Target[_]], _ == r.segments.parts.last, true) + .reflect(p.getClass, classOf[NamedTask[_]], _ == r.segments.parts.last, true) .head ResolveCore.catchWrapException( - definition.invoke(p).asInstanceOf[Target[_]] + definition.invoke(p).asInstanceOf[NamedTask[_]] ) } diff --git a/main/resolve/src/mill/resolve/ResolveCore.scala b/main/resolve/src/mill/resolve/ResolveCore.scala index 31a7d632f39..6b05d5971ba 100644 --- a/main/resolve/src/mill/resolve/ResolveCore.scala +++ b/main/resolve/src/mill/resolve/ResolveCore.scala @@ -376,8 +376,8 @@ private object ResolveCore { } } - val targets = Reflect - .reflect(cls, classOf[Target[_]], namePred, noParams = true) + val namedTasks = Reflect + .reflect(cls, classOf[NamedTask[_]], namePred, noParams = true) .map { m => Resolved.Target(Segments.labels(decode(m.getName))) -> None @@ -388,7 +388,7 @@ private object ResolveCore { .map(m => decode(m.getName)) .map { name => Resolved.Command(Segments.labels(name)) -> None } - modulesOrErr.map(_ ++ targets ++ commands) + modulesOrErr.map(_ ++ namedTasks ++ commands) } def notFoundResult(