Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ts_proto_library to use ProtoInfo. #925

Merged
merged 1 commit into from
Jul 20, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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