This dramatically speeds up mock generation by letting mockgen use bazel's cache
and build graph. We use mockgen's -prog_only and -exec_only modes to split
up mockgen's generation of the interface printing program and mockgen's use of
that program to generate the actual mock code.
By doing that, mockgen no longer runs the go binary to build the interface
printing code which transitively builds the entire GOPATH we created.
This dramatically speeds up mock generation by letting mockgen use bazel's cache and build graph. We use mockgen's
-prog_only
and-exec_only
modes to split up mockgen's generation of the interface printing program and mockgen's use of that program to generate the actual mock code.By doing that, mockgen no longer runs the
go
binary to build the interface printing code which transitively builds the entire GOPATH we created.Fixes #2