Skip to content

Commit f20ef32

Browse files
authored
Require a mnemonic when calling _run_kt_builder_action (#1261)
1 parent 5b593c0 commit f20ef32

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

kotlin/internal/jvm/compile.bzl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,7 @@ def _run_ksp_builder_actions(
459459

460460
def _run_kt_builder_action(
461461
ctx,
462+
mnemonic,
462463
rule_kind,
463464
toolchains,
464465
srcs,
@@ -469,9 +470,11 @@ def _run_kt_builder_action(
469470
transitive_runtime_jars,
470471
plugins,
471472
outputs,
472-
build_kotlin = True,
473-
mnemonic = "KotlinCompile"):
473+
build_kotlin = True):
474474
"""Creates a KotlinBuilder action invocation."""
475+
if not mnemonic:
476+
fail("Error: A `mnemonic` must be provided for every invocation of `_run_kt_builder_action`!")
477+
475478
kotlinc_options = ctx.attr.kotlinc_opts[KotlincOptions] if ctx.attr.kotlinc_opts else toolchains.kt.kotlinc_options
476479
javac_options = ctx.attr.javac_opts[JavacOptions] if ctx.attr.javac_opts else toolchains.kt.javac_options
477480

0 commit comments

Comments
 (0)