Skip to content

Commit

Permalink
Update ts_proto_library to use ProtoInfo.
Browse files Browse the repository at this point in the history
Instead of the deprecated .proto. provider .
  • Loading branch information
lberki authored and alexeagle committed Jul 20, 2019
1 parent 1dc46d5 commit 7d66aa1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/typescript/internal/protobufjs/ts_proto_library.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@ def _run_pbts(actions, executable, js_file):
def _ts_proto_library(ctx):
sources = depset()
for dep in ctx.attr.deps:
if not hasattr(dep, "proto"):
if ProtoInfo not in dep:
fail("ts_proto_library dep %s must be a proto_library rule" % dep.label)

# TODO(alexeagle): go/new-proto-library suggests
# > should not parse .proto files. Instead, they should use the descriptor
# > set output from proto_library
# but protobuf.js doesn't seem to accept that bin format
sources = depset(transitive = [sources, dep.proto.transitive_sources])
sources = depset(transitive = [sources, dep[ProtoInfo].transitive_sources])

output_name = ctx.attr.output_name or ctx.label.name

Expand Down

0 comments on commit 7d66aa1

Please sign in to comment.