aspect-build / rules_ts

Bazel rules for the `tsc` compiler from http://typescriptlang.org
https://docs.aspect.build/rules/aspect_rules_ts
Apache License 2.0
94 stars 53 forks source link

[Bug]: ts_proto_library copy sources does not support having more than one proto_library in a BUILD file #601

Open mrmeku opened 2 months ago

mrmeku commented 2 months ago

What happened?

Right now ts_proto_library uses proto_srcs = native.glob(["**/*.proto"]) to detect what generated files it should expect to copy. This is a convenient but erroneous assumption. If a particular build file has two protos a.proto and b.proto but only a.proto was used to generate a ts_proto_library this assumption breaks and you are forced to disable source copying or merge the proto_libraries together

Version

Development (host) and target OS/architectures: all

Output of bazel --version: all

Version of the Aspect rules, or other relevant rules from your WORKSPACE or MODULE.bazel file: 987b6acbc4b44959e0d92d1d2c950336ab2a9bad

Language(s) and/or frameworks involved: starlark

How to reproduce

No response

Any other information?

No response