-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Cannot generate swagger with generated protobuf #1094
Comments
This feels like it has something to do with protobuf virtual imports. I think its fine for bazel clients before v1. I added a quick hack and was able to get the json files to build, but in the wrong place.
This produces the following error:
This file was created under |
Another update, I was able to hack this target together with the following patch.
This, of course, is not a sustainable solution because it will not work for other targets. However, it does outline a resolution path for virtual imports. |
Ultimately I believe that Due to that, I'm happy to accept hacks if you think that we can get a few months of use out of the hack. |
There were some sharp edges in proto rules that got fixed in Bazel 1.0 (e.g., generated files may have been not under I've seen the issue above before (it's actually pretty common because the path of proto files changed recently; IIRC, gRPC also had it), so let me compile together a patch. |
This can happen if: 1. `proto_library` contains at least one of `import_prefix/strip_import_prefix`, or 2. (for Bazel >= 1.0) at least one of `proto_library`'s `srcs` is generated. Fixes grpc-ecosystem#1094
This can happen if: 1. `proto_library` contains at least one of `import_prefix/strip_import_prefix`, or 2. (for Bazel >= 1.0) at least one of `proto_library`'s `srcs` is generated. Fixes grpc-ecosystem#1094
This can happen if: 1. `proto_library` contains at least one of `import_prefix/strip_import_prefix`, or 2. (for Bazel >= 1.0) at least one of `proto_library`'s `srcs` is generated. Fixes grpc-ecosystem#1094
This can happen if: 1. `proto_library` contains at least one of `import_prefix/strip_import_prefix`, or 2. (for Bazel >= 1.0) at least one of `proto_library`'s `srcs` is generated. Fixes grpc-ecosystem#1094
This can happen if: 1. `proto_library` contains at least one of `import_prefix/strip_import_prefix`, or 2. (for Bazel >= 1.0) at least one of `proto_library`'s `srcs` is generated. Fixes grpc-ecosystem#1094
This can happen if: 1. `proto_library` contains at least one of `import_prefix/strip_import_prefix`, or 2. (for Bazel >= 1.0) at least one of `proto_library`'s `srcs` is generated. Fixes #1094
This can happen if: 1. `proto_library` contains at least one of `import_prefix/strip_import_prefix`, or 2. (for Bazel >= 1.0) at least one of `proto_library`'s `srcs` is generated. Fixes grpc-ecosystem#1094
Steps you follow to reproduce the error:
git clone git@github.com:prestonvanloon/grpc-gateway.git
git checkout genrule-failure
bazel build //examples/proto/examplepb:examplepb_protoc_gen_swagger
What did you expect to happen instead:
It works
What's your theory on why it isn't working:
I think something is wrong with the includes when using a generated file. Haven't started to investigate a fix yet.
The text was updated successfully, but these errors were encountered: