clean-window-81064
02/03/2023, 9:20 PMcurved-television-6568
02/03/2023, 9:44 PMpants dependencies --transitive path/to/your/distribution:target
?happy-kitchen-89482
02/03/2023, 9:45 PM.proto
files expected to be in the wheel, or the _pb.py
files generated from them?clean-window-81064
02/04/2023, 7:00 AMhappy-kitchen-89482
02/04/2023, 3:42 PMhappy-kitchen-89482
02/04/2023, 3:43 PM./pants export-codegen
?happy-kitchen-89482
02/04/2023, 3:43 PMhappy-kitchen-89482
02/04/2023, 3:44 PMunzip -t
, say) that the files are actually not in the wheel file? rather than just not importing for some reason?clean-window-81064
02/04/2023, 4:48 PMAre the missing _pb.py files generated to a path that is under a source rootYes
Do you see them when you runoh I wasn’t aware of this Thanks. I tried this & am running into some errors related to golang -?./pants export-codegen
Please specify either:
• a "go_package" option in the .proto source file, or
• a "M" argument on the command line.
See <https://developers.google.com/protocol-buffers/docs/reference/go-generated#package> for more information.
--go_out: protoc-gen-go: Plugin failed with status code 1.
I will try to figure a way around this and share result. In the meantime, if you have any suggestions pls let me know.
(EDIT: Check below added notes)
Can you think of any differences between the ones that are in the wheel and the ones that aren’t?No, not really. Both are defined in the BUILD file, and in some other
pex_binary
target they are being imported as expected.
One thing is - the missing files (let’s call it depA.proto) is being imported in other parent proto file (let’s call is parent.proto) & the parent.proto is being imported as expected (but missing the dependency).
And I assume you’ve checked (withYes that’ right. I have unzipped the tar.gz and checked EDIT: The, say) that the files are actually not in the wheel file?unzip -t
codegen
was resolved and it was able to generate all the protos.clean-window-81064
02/06/2023, 7:40 AMpython_distribution
wasn’t defined at the root and thus it was failing to pull some files.
Reason for not starting with python_distribution
in the root itself was - we already have a python_distribution
defined at the root & thus while adding another one was getting AmbiguousOwnerError
, but seems like there is no other way here ?
Exact error -
AmbiguousOwnerError: Found multiple sibling python_distribution targets that are the closest ancestor dependees of src/backend/abc/libs/service/quitter.py:quitter and are therefore candidates to own it: src/backend/abc:rl, src/backend/abc:data_processing. Only a single such owner is allowed, to avoid ambiguity. See <https://www.pantsbuild.org/v2.14/docs/python-distributions> for how python_sources targets are mapped to distributions. See <https://www.pantsbuild.org/v2.14/docs/python-distributions>.
curved-television-6568
02/06/2023, 1:50 PM!!src/backend/abc/libs/service/quitter.py
to the dependencies of conflicting distribution.
https://www.pantsbuild.org/docs/targets#dependencies-fieldclean-window-81064
02/07/2023, 10:09 AMhappy-kitchen-89482
02/07/2023, 5:27 PMpython_distribution
, it has to have some way of assigning each python module to a wheel it builds. The algorithm it uses for this is described here: https://www.pantsbuild.org/docs/python-distributions#mapping-source-files-to-distributionshappy-kitchen-89482
02/07/2023, 5:27 PMhappy-kitchen-89482
02/07/2023, 5:28 PMclean-window-81064
02/09/2023, 6:27 PM