Skip to content

Commit

Permalink
Use new ProtoInfo provider
Browse files Browse the repository at this point in the history
The old `.proto` provider will be removed in a future Bazel version.

See google#2.

Change-Id: Id53260a1855f078d510779ad66cf23f9ede09a61
GitOrigin-RevId: f822b73d7c9cf0810f7cae6be529a8d09122dd9e
  • Loading branch information
drigz authored and copybara-github committed Mar 5, 2019
1 parent 56e709a commit 0642c7b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bazel/build_rules/proto_descriptor.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ def paths(files):
return [f.path for f in files.to_list()]

def _impl(ctx):
descriptors = ctx.attr.proto_library.proto.transitive_descriptor_sets
descriptors = ctx.attr.proto_library[ProtoInfo].transitive_descriptor_sets
ctx.actions.run_shell(
inputs = descriptors,
outputs = [ctx.outputs.out],
Expand Down
2 changes: 1 addition & 1 deletion bazel/proto_crd/proto_k8s_service.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ load("@cloud_robotics//bazel/proto_crd:proto_crd.bzl", "proto_crd")
load("@grpc_ecosystem_grpc_gateway//protoc-gen-swagger:defs.bzl", "protoc_gen_swagger")

def _impl(ctx):
import_files = [f.path for f in ctx.attr.spec.proto.direct_sources]
import_files = [f.path for f in ctx.attr.spec[ProtoInfo].direct_sources]
imports = ["import \"{}\";".format(f) for f in import_files]
options = ["option {} = \"{}\";".format(k, v) for k, v in ctx.attr.file_options.items()]

Expand Down

0 comments on commit 0642c7b

Please sign in to comment.