Skip to content

Commit

Permalink
Depend on tools in the exec configuration (#301)
Browse files Browse the repository at this point in the history
As of Bazel 4, protoc and most tools are dependend on via the exec
configuration rather than the host configuration. By also using the exec
transition in grpc_kotlin, unnecessary (and very costly) rebuilds of
protoc can be prevented.
  • Loading branch information
fmeum authored Nov 22, 2021
1 parent 85efbc1 commit 5ccb209
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions kt_jvm_grpc.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ _kt_grpc_generate_code = rule(
),
_zipper = attr.label(
executable = True,
cfg = "host",
cfg = "exec",
default = Label("@bazel_tools//tools/zip:zipper"),
allow_files = True,
),
_generator = attr.label(
default = Label("//compiler/src/main/java/io/grpc/kotlin/generator:GeneratorRunner"),
cfg = "host",
cfg = "exec",
executable = True,
),
),
Expand Down Expand Up @@ -233,12 +233,12 @@ _kt_jvm_proto_library_helper = rule(
),
_protoc = attr.label(
default = Label("@com_google_protobuf//:protoc"),
cfg = "host",
cfg = "exec",
executable = True,
),
_zip = attr.label(
default = Label("@bazel_tools//tools/zip:zipper"),
cfg = "host",
cfg = "exec",
executable=True
),
),
Expand Down

0 comments on commit 5ccb209

Please sign in to comment.