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

Fail to compile proto_library with multiple proto files and strip_import_prefix #7060

Closed
linzhp opened this issue Jan 8, 2019 · 1 comment
Labels
team-Rules-Server Issues for serverside rules included with Bazel untriaged

Comments

@linzhp
Copy link
Contributor

linzhp commented Jan 8, 2019

Description of the problem / feature request:

Bazel cannot build proto_library with strip_import_prefix and multiple proto files importing each other.

Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

git clone git@github.com:linzhp/bazel_examples.git
cd bazel_examples
bazel build -s proto/infra:infrapb_proto

What operating system are you running Bazel on?

macOS 10.14.2

What's the output of bazel info release?

release 0.22.0

Have you found anything relevant by searching the web?

The parameter strip_import_prefix is added in #5536, but the test case does not cover the scenario when a proto_library has several proto files in the srcs importing each other.

Any other information, logs, or outputs that you want to share?

From the actual protoc command Bazel runs, we can see that the import prefix was not stripped in

--direct_dependencies google/protobuf/empty.proto:google/protobuf/timestamp.proto:google/protobuf/wrappers.proto:proto/infra/base.proto:proto/infra/host.proto

After manually removing the import prefix in --direct_dependencies, the protoc command would succeed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-Rules-Server Issues for serverside rules included with Bazel untriaged
Projects
None yet
Development

No branches or pull requests

2 participants