<#21529 Go codegen doesn't work> Issue created by ...
# github-notifications
c
#21529 Go codegen doesn't work Issue created by rdeknijf Go codegen doesn't work
Copy code
$ pants export-codegen ::

11:11:48.11 [ERROR] 1 Exception encountered:

Engine traceback:
in `export-codegen` goal

ProcessExecutionFailure: Process 'Build Go gRPC protobuf plugin for `protoc`.' failed with exit code 1.
stdout:

stderr:
go: <http://google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2.0|google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2.0>: loading deprecation for <http://google.golang.org/grpc/cmd/protoc-gen-go-grpc|google.golang.org/grpc/cmd/protoc-gen-go-grpc>: module lookup disabled by GOPROXY=off
So,
export-codegen
doesn't work. Also, the docs describe that Pants auto-regenerates any protobuf output. But it doesn't. If you remove the `pkg/person.pb.go `file, and run
Copy code
pants test :: tests fail. If you run protoc --go_out=. --go_opt=paths=source_relative person.proto`
(in
pkg
), tests are good again. So, about `GOPROXY`: I've tried setting it multiple ways, but Pants seems to ignore it all. I think there may be a relation with: #21527 Pants version Tested on
2.22
and
2.23
OS Both Linux and Mac. Additional info Here's a minimal reproduction repo: https://github.com/rdeknijf/pants-repro-protoc pantsbuild/pants