From 3f3dea27241ddac85df8a30d6bfc5224d9f183a8 Mon Sep 17 00:00:00 2001 From: Olivier Notteghem Date: Thu, 23 May 2024 20:02:58 -0700 Subject: [PATCH] Restrict unecessary inputs to 'JdepsMerge' actions --- kotlin/internal/jvm/compile.bzl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kotlin/internal/jvm/compile.bzl b/kotlin/internal/jvm/compile.bzl index 357c516ed..9bff32099 100644 --- a/kotlin/internal/jvm/compile.bzl +++ b/kotlin/internal/jvm/compile.bzl @@ -346,8 +346,10 @@ def _run_merge_jdeps_action(ctx, toolchains, jdeps, outputs, deps): len(jdeps), ) - # For sandboxing to work, and for this action to be deterministic, the compile jars need to be passed as inputs - inputs = depset(jdeps, transitive = [depset([], transitive = [dep.transitive_compile_time_jars for dep in deps])]) + inputs = depset(jdeps) + if not toolchains.kt.experimental_report_unused_deps == "off": + # For sandboxing to work, and for this action to be deterministic, the compile jars need to be passed as inputs + inputs = depset(jdeps, transitive = [depset([], transitive = [dep.transitive_compile_time_jars for dep in deps])]) ctx.actions.run( mnemonic = mnemonic,