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
104 stars 58 forks source link

ts_proto_library error on proto with import_prefix property #621

Open egormodin opened 4 months ago

aspect-workflows[bot] commented 4 months ago

Test

:warning: GitHub Actions build #559 failed.

//examples/proto_grpc:status_ts_proto failed to build

ProtocGenEs returned a non-zero exit code when running remotely
 
Action details (uncached result): http://localhost:7984/blobs/sha256/historical_execute_response/45c4aa5c9814cad30ddd43a7737a2878bc8ad69b43197327b49754460aad2082-539/
Could not find file in descriptor database: bazel-out/k8-fastbuild/bin/examples/proto_grpc/_virtual_imports/status_proto/aspect/example/examples/proto_grpc/status.proto: No such file or directory

:bulb: To reproduce the build failures, run

bazel build //examples/proto_grpc:status_ts_proto

Buildifier

Buildifier managed files require formatting

--- ./examples/proto_grpc/BUILD.bazel   2024-06-04 16:36:59.148750149 +0000
+++ /tmp/buildifier-tmp-4176048075  2024-06-04 16:37:40.439785940 +0000
@@ -24,8 +24,8 @@
 proto_library(
     name = "status_proto",
     srcs = status_srcs,
-    visibility = ["//visibility:public"],
     import_prefix = "aspect/example",
+    visibility = ["//visibility:public"],
     deps = [
         "@com_google_protobuf//:any_proto",
     ],

:bulb: Run the following to apply the suggested formatting fixes

bazel run //:buildifier

Format

Formatting check has failed

:bulb: Some formatting failures can be fixed automatically by running the command below, while others may require manual fixes

bazel run //:format -- examples/proto_grpc/BUILD.bazel

:information_source: A patch file containing the changes has been archived as an artifact of this build

liningpan commented 2 months ago

Is the solution here striping away proto_info.proto_source_root for all direct_sources like https://github.com/protocolbuffers/protobuf/blob/f396f7cb9fc6d8fcd897f3d88c05721642db6b46/bazel/common/proto_common.bzl#L75-L84 ?

liningpan commented 2 months ago

Right now there is also no way to configure es_out, which might also interact with this feature in unexpected ways.