Skip to content

Commit

Permalink
Merge pull request #19860 from lberki/master
Browse files Browse the repository at this point in the history
Update C++ code generation to work with Bazel 0.29 .
  • Loading branch information
jtattermusch committed Aug 12, 2019
2 parents 834f0c7 + e2ba3aa commit 5bf40ae
Showing 1 changed file with 7 additions and 0 deletions.
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

0 comments on commit 5bf40ae

Please sign in to comment.