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

py_proto_compile fails to correctly specify output for subdirectories #78

Closed
toffaletti opened this issue Apr 6, 2017 · 4 comments
Closed

Comments

@toffaletti
Copy link

See example here: https://github.com/toffaletti/proto_fail

py_proto_compile(
    name = "py_options_proto",
    protos = ["models/options.proto"],
    with_grpc = False,
    visibility = ["//visibility:public"],
)

ERROR: proto_fail/BUILD:2:1: output 'options_pb2.py' was not created.
ERROR: proto_fail/BUILD:2:1: not all outputs were created or valid.

protoc mirrors the input directory hierarchy and creates the output in models/options_pb2.py

@pcj
Copy link
Contributor

pcj commented Apr 6, 2017

Thanks for the report. Probably will have to look closer at https://github.com/pubref/rules_protobuf/blob/master/protobuf/internal/proto_compile.bzl#L143-L163 in the case of python (or perhaps numerous languages when src label is not in the current directory as the BUILD file).

@pcj
Copy link
Contributor

pcj commented Apr 20, 2017

FYI this only seems to occur when the py_proto_compile rule is in root BUILD file (the BUILD file in the same directory as the WORKSPACE)...

@andrewmchen
Copy link

Ran into this issue today when generating py_proto_library in a directory with a - in it. Fix was to remove the -.

@pcj
Copy link
Contributor

pcj commented Dec 7, 2018

Note: these rules have been re-written and migrated to https://github.com/stackb/rules_proto. Please re-open there if issue persists, thanks.

Cleaning up all issues on this repo, apologies in advance for closing without proper response.

@pcj pcj closed this as completed Dec 7, 2018
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

No branches or pull requests

3 participants