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

Update C++ code generation to work with Bazel 0.29 . #19860

Merged
merged 1 commit into from
Aug 12, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions bazel/protobuf.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ def proto_path_to_generated_filename(proto_path, fmt_str):
def _get_include_directory(include):
directory = include.path
prefix_len = 0

virtual_imports = "/_virtual_imports/"
if not include.is_source and virtual_imports in include.path:
root, relative = include.path.split(virtual_imports, 2)
result = root + virtual_imports + relative.split("/", 1)[0]
return result

if not include.is_source and directory.startswith(include.root.path):
prefix_len = len(include.root.path) + 1

Expand Down