<#21409 Protobuf sources does not work with parame...
# github-notifications
c
#21409 Protobuf sources does not work with parametrized resolves Issue created by omri-cavnue Describe the bug When introducing multiple resolves into the repo, all of the python sources and test targets seem to work. However, the protobuf_sources does not work against multiple resolves. On a single resolve, the target works. But when parametrizing against multiple resolves, it complains about proto files not being found when they are imported into other proto files. Pants version 2.21.0 OS Both mac and linux Additional info The repo structure is similart to:
Copy code
├── proto
    | └── messages
    │    └── example
    │       └── v1
    │           └── person.proto
         └── example_2
            └── v1
    │           └── dog.proto
    | └── BUILD
   ├── python
    | └── packages
    │    └── messages
    |         └── src
Here, the dog.proto would import person.proto to identify an owner.
Copy code
syntax = "proto3";
package messages.example_v2.v1;
import "messages/example/v1/owner.proto";

message Dog {
   string name = 1;
   example.v1.Person owner = 2;
}
and it complains about messages/example/v1/person.proto File not found. The BUILD file is as follows:
Copy code
protobuf_sources(
    name = "protos",
    python_source_root = "python/packages/messages/src",
    sources = ["messages/**/*.proto"],
    python_resolve = parametrize("core", "dev"),
)
With one resolve, this works as expected. With multiple resolves, it complains that the person.proto file is not found when trying to create python sources for the dog proto pantsbuild/pants