diff options
| author | 2023-08-14 16:52:24 +0000 | |
|---|---|---|
| committer | 2023-08-14 19:17:39 +0000 | |
| commit | 215adb43d33d6d60b942a1573bb77251c12bff0e (patch) | |
| tree | 2f62981152a2e1d1b17b074b1bc2cff6715b4786 /python/python.go | |
| parent | 95e8fe9e1ef15836f8c7dbf62f3dd1a706019f57 (diff) | |
Fix possible orphaned proto_library targets
This is a fix for aosp/2693190 that handled .proto files that end up in
different bazel packages. It did it by creating proto_library targets in
the correct bazel package.
Changing the granularity causes issues if the the new proto_library in
the subpackage imports a .proto file from a parent package or a
different package. e.g.
```
tmp
├── foo.proto
└── subdir/import_foo.proto # contains an `import "foo.proto"`
└── subdir/Android.bp # package boundary
├── Android.bp # contains a cc_library with foo.proto and
# subdir/import_foo.proto
```
At ToT, the ProtoInfo we provide to CcProtoGen is correct, but the
proto_library in subdir/BUILD will not compile because it does not have
a dep on the proto_library in ./BUILD
This CL creates a workaround by adding `manual` to the proto_library
targets. This CL is based on the assumption that the buildable unit in
bp2build is cc_library_*, and not proto_library necessarily (atleast
till we do a manual/automated cleanup)
Test: Created an integration test in build/bazel
Test: go test ./bp2build
Bug: 292583584
Bug: 246997908
Change-Id: I73120be2411967cb144f37ed4417f76ecf1a6ffa
Diffstat (limited to 'python/python.go')
0 files changed, 0 insertions, 0 deletions