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

ts_proto_library error on proto with import_prefix property #621

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

egormodin
Copy link
Contributor

No description provided.

…D file

error: `Error in directory_path: directory_path rule '_logger_pb.d.ts_dirpath' in package 'examples/proto_grpc' conflicts with existing directory_path rule`
# Conflicts:
#	examples/proto_grpc/BUILD.bazel
#	ts/proto.bzl
Copy link

aspect-workflows bot commented Jun 4, 2024

Test

⚠️ 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

💡 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",
     ],

💡 Run the following to apply the suggested formatting fixes

bazel run //:buildifier

Format

Formatting check has failed

💡 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

ℹ️ A patch file containing the changes has been archived as an artifact of this build

@thesayyn thesayyn self-assigned this Jun 5, 2024
@liningpan
Copy link

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants