You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix Bazel 7 related protobuf build failures (#1620)
Related to #1482, #1618, and #1619. Results from the investigation
documented at:
- #1619 (comment)
Updates `_import_paths()` in `scala_proto_aspect.bzl` to handle
differences `ProtoInfo.proto_source_root` and `ProtoInfo.direct_sources`
values between Bazel 6 and Bazel 7.
Without this change, `_import_paths()` emits incorrect values under
Bazel 7, causing targets containing generated `.proto` inputs to fail,
e.g. `//test/proto3:test_generated_proto`.
See also:
- Fix paths for sibling repository setup and generated .proto files
bazelbuild/bazel@6c6c196
- The docstring for `ProtoInfo.proto_source_root` in the Bazel sources:
https://github.com./bazelbuild/bazel/blob/7.3.2/src/main/starlark/builtins_bzl/common/proto/proto_info.bzl#L155-L172
- Remove incompatible_generated_protos_in_virtual_imports
bazelbuild/bazel@3efaa32
- Comment from: Generated Protos are no longer considered as
virtual_imports in Bazel 7
bazelbuild/bazel#21075 (comment)
---
I cherrypicked this commit into #1618. While it fixed the
`//test/proto3` build failure, it does _not_ fix the hanging
scalapb_workers from the ProtoScalaPBRule aspect.
I'll have to investiate further whether than hang is related to Bazel,
rules_proto, com_google_protobuf, or some mixture thereof. Still,
progress!
0 commit comments