protoc-gen-ts icon indicating copy to clipboard operation
protoc-gen-ts copied to clipboard

Transitive deps aren't generated in Bazel

Open nbutko opened this issue 2 years ago • 1 comments

Using protoc-gen-ts 0.8.4, I have a Bazel build file like:

ts_proto_library(
    name = "hello-ts",
    deps = [
        ":hello"
    ],
    visibility = [
        "//visibility:public",
    ],
)

proto_library(
    name = "details",
    srcs = [
        "details.proto",
    ],
    visibility = [
        "//visibility:private",
    ],
)

proto_library(
    name = "hello",
    srcs = [
        "hello.proto",
    ],
    deps = [
        ":details",
    ],
    visibility = [
        "//visibility:private",
    ],
)

When I run bazel build :hello-ts, only hello.ts is generated. This imports details.ts but details.ts is not generated. In this case, all of the .ts files in the transitive deps tree of :hello should be generated.

nbutko avatar Jul 03 '22 06:07 nbutko

this is currently broken. I believe it was working at some point but I broke it. We need to make the rule to be an aspect to do make this use case work.

I'd be happy to accept a PR if you are up for it.

thesayyn avatar Jul 09 '22 16:07 thesayyn

This is not relevant as we don't expose a bazel rule anymore.

thesayyn avatar Nov 16 '23 01:11 thesayyn