Closed kormat closed 4 years ago
Building mockgen with bazel fails because our version of rules_go
pulls in a broken version of org_golang_x_tools (it predates https://github.com/golang/tools/commit/202502a5a9245830b5ec7b877e26b67760da8e67). The minimum version of rules_go
to fix this seems to be 0.19.0
.
Building mockgen with bazel fails with the updated rules_go
because... it pulls in a newer version of org_golang_x_tools which has the same problem as the old version, just in a different file: https://github.com/golang/tools/commit/eec4c98bf5a6a9765c9de84cf61e447130fe8e54#diff-1910375731a87c0dea421568450908cc is the fix.
The use of gomocks in our codebase currently has the following issues:
mockgen
is in the user's path.tools/gomocks
will actually work.Proposed fix:
mockgen
binary for the version ofgithub.com/golang/mock
we're using, and then use that intools/gomocks
.scion.sh mocks
tomake mocks
. That way it can depend on setting up the required env (including compiling the mockgen binary).mock_X
dirs that should exist, and throw an error if any othermock_X
dirs exist.mock_X
dirs before regenerating mocks.