bazel: handle generated protos from external repos#45
Merged
aviator-app[bot] merged 2 commits intomainfrom Feb 16, 2026
Merged
Conversation
Current Aviator status
This PR was merged using Aviator.
See the real-time status of this PR on the
Aviator webapp.
Use the Aviator Chrome Extension
to see the status of your PR within GitHub.
|
onelxj
approved these changes
Feb 13, 2026
880ffac to
d6b3a4d
Compare
d6b3a4d to
ee6af94
Compare
1831d93 to
5f602a1
Compare
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.
Now that we've been able to use the UI to remove the stale check-requirements, we can reintroduce the file-based config.
5f602a1 to
fc15160
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When pyprotoc is used through an external repository, generated proto files can arrive with a path/short_path mismatch:
The previous logic in
rules.bzldid 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.