-
Notifications
You must be signed in to change notification settings - Fork 4.1k
*: instances of //go:generate should be bazelified #57787
Copy link
Copy link
Closed
Labels
A-build-systemC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
Description
We have generated files with //go:generate that need be rewritten in the sandbox provided that any depending files have changed: https://sourcegraph.com/search?q=repo:%5Egithub%5C.com/cockroachdb/cockroach%24+//go:generate&patternType=literal
These need to replaced with a bazel genrule. When using something like stringer, we may need https://github.com/kubernetes/repo-infra/blob/master/defs/go.bzl#L108 to do so such that go can run stringer.
This can be broken down into several streams:
//go:generate stringer(try send only doing this for one PR for one before going through the rest. break this up for ease of review! try look and see of the kubernetes repo already handles this)//go:generate langgen//go:generate go run ...(anything that has a go run as a prefix) # note we may need to put this into a separate package if it runs something in the same package.
These are non-high priority:
- Anything that is roachprod / test related (but doing it is a definite bonus). You can determine this by checking if the package is depended on by
cockroach-shortby runningbazel query 'rdeps(pkg/cmd/cockroach-short, //pkg/util/cache:cache)' //go:generate ../util/leaktest/add-leaktest.sh// this is only for tests - happy to let this slide until the CI stage
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-build-systemC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)