From 1c92d8f5ad128ae149d1a323abc9062af2f838a5 Mon Sep 17 00:00:00 2001 From: Tobias Roeser Date: Tue, 28 Jan 2025 19:19:33 +0100 Subject: [PATCH] Clenaup ScalaPB, no need to persist private scalaDepsPBIncludePath (#4424) Co-authored-by: Li Haoyi --- .../src/mill/contrib/scalapblib/ScalaPBModule.scala | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/contrib/scalapblib/src/mill/contrib/scalapblib/ScalaPBModule.scala b/contrib/scalapblib/src/mill/contrib/scalapblib/ScalaPBModule.scala index 3c2b08310ad..a88655a6df6 100644 --- a/contrib/scalapblib/src/mill/contrib/scalapblib/ScalaPBModule.scala +++ b/contrib/scalapblib/src/mill/contrib/scalapblib/ScalaPBModule.scala @@ -85,8 +85,10 @@ trait ScalaPBModule extends ScalaModule { def scalaPBIncludePath: T[Seq[PathRef]] = Task.Sources { Seq.empty[PathRef] } - private def scalaDepsPBIncludePath = if (scalaPBSearchDeps) Task { Seq(scalaPBUnpackProto()) } - else Task { Seq.empty[PathRef] } + private def scalaDepsPBIncludePath: Task[Seq[PathRef]] = scalaPBSearchDeps match { + case true => Task.Anon { Seq(scalaPBUnpackProto()) } + case false => Task.Anon { Seq.empty[PathRef] } + } def scalaPBProtoClasspath: T[Agg[PathRef]] = Task { defaultResolver().resolveDeps(