Does the Go support include `go generate` yet? I c...
# general
l
Does the Go support include
go generate
yet? I can't seem to find it in the docs or any issues tracking it.
f
It doesn’t. I’ll open an issue.
although given that
go generate
is never run automatically, it should still work with Pants by just invoking
go generate
independently and checking in those sources
going by the help text:
Copy code
Go generate is never run automatically by go build, go get, go test,
and so on. It must be run explicitly.
l
yeah, I was thinking that pants should run it, yeah?
f
eventually maybe. for at least 2.9 and 2.10, Pants still relies on the Go tooling for certain operations including managing the go.mod/go.sum files. given how
go generate
is a manual step outside of the direct build of binaries/packages, we’d probably not support in the near term.
👍 1
(since the work around is to just invoke
go generate
and Pants can still work with the generated files)
what use case were you envisioning?
for example, if it were for protobuf/thrift code generation, then that use case is better supported by teaching the Go backend to generate Go sources from protobuf files directly, just like the Python backend (and soon this week the Scala backend) can do
👍 1
h
Is generate usually run as a one time operation, or you continue running the same transformations repeatedly? Like that you'd hook up to ./pants fmt?