Commit ee6af94
committed
bazel: handle generated protos from external repos
When pyprotoc is used through an external
repository, generated proto files can arrive with
a path/short_path mismatch:
- path: bazel-out/.../external/<repo>/...
- short_path: ../<repo>/...
The previous logic in `rules.bzl` did not match
this shape and fell through to "Handling this type
of (generated?) .proto file was not forseen".
This commit adds a narrow branch in the existing
proto loop to normalize this short_path form to a
repo-relative path and emit the corresponding `-I`
+ input proto args.
This keeps existing behavior for local files,
external source files, and `_virtual_imports`,
while fixing generated protos from external repos.1 parent 2e54d83 commit ee6af94
1 file changed
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
104 | 116 | | |
105 | 117 | | |
106 | 118 | | |
| |||
0 commit comments