cockroachdb / cockroachdb/cockroach
bazel: speed up `dev gen bazel`
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
This is a tracking issue for speeding up `dev gen bazel`. This can include unconditional speedups and optimizations in addition to conditional ones, since `dev gen bazel` is conditional in general.
## "collapse" binaries
`bazel-generate.sh` is made up of many distinct steps which we split into 3 categories:
1. Pre-`gazelle`
2. `gazelle`
3. Post-`gazelle`
There are 5 distinct post-`gazelle` build steps:
```
generate-logictest
generate-acceptance-tests
generate-distdir
genbzl
generate-bazel-extra
```
Just running `bazel run` 5 times is already quite slow, even for a no-op binary. It would be best to "collapse" these, to whatever extent possible, into only one binary, and therefore only one `bazel run`.
Having said that, some of these binaries have more dependencies than others (specifically `generate-logictest`). Keeping it separate may therefore be beneficial.
See also #123164
Epic: CRDB-17171
Jira issue: CRDB-38219
Contributor guide
Assessment
This issue has not been assessed yet.