<#15698 export-codegen only exports Go, but not Py...
# github-notifications
q
#15698 export-codegen only exports Go, but not Python files Issue created by isingh Describe the bug I am trying out using python and go in the same repo. I setup a directory with proto definitions for gRPC service. Both python and Go can use these definitions in tests right now. However when I run
./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
Copy code
[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:
Copy code
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:
Copy code
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/pants
u