Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package higherkindness.rules_scala.common.worker

import com.google.devtools.build.lib.worker.WorkerProtocol
import java.io.PrintStream
import java.nio.file.Path

Expand All @@ -10,4 +11,5 @@ case class WorkTask[S](
workDir: Path,
verbosity: Int,
isCancelled: Function0[Boolean],
inputs: Option[List[WorkerProtocol.Input]],
)
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import java.nio.file.Path
import java.util.concurrent.{CancellationException, ConcurrentHashMap, ForkJoinPool}
import scala.annotation.tailrec
import scala.concurrent.{ExecutionContext, ExecutionException, Future}
import scala.jdk.CollectionConverters.*
import scala.util.{Failure, Success, Using}
import java.time.{ZoneId, ZonedDateTime}

Expand Down Expand Up @@ -164,7 +165,17 @@ abstract class WorkerMain[S](stdin: InputStream = System.in, stdout: PrintStream
maybeOutStream = Some(outStream)
maybeOut = Some(out)
try {
work(WorkTask(ctx, args, out, sandboxDir, verbosity, isCancelled))
work(
WorkTask(
ctx,
args,
out,
sandboxDir,
verbosity,
isCancelled,
Some(request.getInputsList.asScala.toList),
),
)
0
} catch {
case e @ AnnexWorkerError(code, _, _) =>
Expand Down Expand Up @@ -277,6 +288,7 @@ abstract class WorkerMain[S](stdin: InputStream = System.in, stdout: PrintStream
workDir = Path.of(""),
verbosity = 0,
isCancelled = () => false,
inputs = None,
),
)

Expand Down
Loading