Skip to content

Commit 9a1edc9

Browse files
author
Jaden Peterson
committed
Don't always provide transitive dependencies' analysis files to ZincRunner
They aren't used if Zinc persistence is disabled. They also contain hashes of sources, which effectively makes `ijar` useless, since a target will be always be recompiled if its transitive dependencies were changed, regardless of whether their ijars changed.
1 parent d9e701d commit 9a1edc9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

rules/private/phases/phase_zinc_compile.bzl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ def phase_zinc_compile(ctx, g):
3939
common_scalacopts = toolchain.scala_configuration.global_scalacopts + ctx.attr.scalacopts
4040

4141
args = ctx.actions.args()
42-
args.add_all(depset(transitive = [zinc.deps for zinc in zincs]), map_each = _compile_analysis)
42+
if toolchain.zinc_configuration.incremental:
43+
args.add_all(depset(transitive = [zinc.deps for zinc in zincs]), map_each = _compile_analysis)
44+
4345
args.add("--compiler_bridge", toolchain.zinc_configuration.compiler_bridge)
4446
args.add_all("--compiler_classpath", g.classpaths.compiler)
4547
args.add_all("--classpath", g.classpaths.compile)
@@ -70,7 +72,7 @@ def phase_zinc_compile(ctx, g):
7072
g.classpaths.plugin,
7173
g.classpaths.compile,
7274
g.classpaths.compiler,
73-
] + [zinc.deps_files for zinc in zincs],
75+
] + ([zinc.deps_files for zinc in zincs] if toolchain.zinc_configuration.incremental else []),
7476
)
7577

7678
outputs = [

0 commit comments

Comments
 (0)