Hey all, I'm seeing issues around protobuf_sources...
# general
r
Hey all, I'm seeing issues around protobuf_sources when introducing multiple resolves. When it is attempting to build the python source, it complains that certain files are not found. However, when I remove the parametrization, it works OK, but then downstream dependencies fail๐Ÿงต
The directory structure for the proto messages is something akin to:
Copy code
โ”œโ”€โ”€ proto
    | โ””โ”€โ”€ messages
    โ”‚    โ””โ”€โ”€ example
    โ”‚       โ””โ”€โ”€ v1
    โ”‚           โ””โ”€โ”€ person.proto
         โ””โ”€โ”€ example_2
            โ””โ”€โ”€ v1
    โ”‚           โ””โ”€โ”€ dog.proto
    | โ””โ”€โ”€ BUILD
and the BUILD file looks like:
Copy code
protobuf_sources(
    name = "protos",
    python_source_root = "python/packages/messages/src",
    sources = ["messages/**/*.proto"],
    python_resolve = parametrize("core", "dev"),
)
and then I see a lot of File not found errors regarding imports within the messages package
for example
dog
would import
person
to define the owner. But it complains that person.proto does not exist. This works without any errors on a single resolve
b
Sorry for the trouble. I'm guessing you also filed https://github.com/pantsbuild/pants/issues/21409 ? As we're discussing there, can you maybe try upgrading to a new Pants and/or create a standaloen reproducer? Thanks!
r
Hey @broad-processor-92400, I'm trying now with 22 and 23. But will update that issue
I just updated the comment here with a sample repro repo
๐Ÿ‘ 1