quaint-telephone-89068
02/27/2023, 6:22 PM./pants export-codegen :: it only exports Go files and not python. Go 1.18 and Python 3.9.
Pants version
2.11
OS
MacOS
Additional info
Sample pants.toml
[GLOBAL]
pants_version = "2.11.0"
backend_packages = [
"pants.backend.python",
"pants.backend.python.lint.black",
"pants.backend.codegen.protobuf.python",
"pants.backend.experimental.codegen.protobuf.go",
"pants.backend.experimental.go",
]
[golang]
expected_version = "1.18"
[source]
root_patterns = [
'/py',
'/protos',
'/pkg',
]
All python code is in /py, grpc in /protos and go in /pkg.
/protos/BUILD contains:
rotobuf_sources(
name="protos",
grpc=True,
)
python_requirements(
name="requirements.txt",
)
python_requirement(name="grpc", requirements=["grpcio>=1.46.0"], modules=["grpc"])
protos/requirements.txt contains:
grpcio>=1.46.0
protobuf~=3.19.0
If I run ./pants test :: both python and go tests are able to compile the rpc protobufs and actually test (I havent tried talking between go and py yet)
pantsbuild/pantsuser
02/27/2023, 6:22 PM