Skip to content

Commit 60290f2

Browse files
authored
Mark gomock() hidden targets manual (#4265)
**What type of PR is this?** Bug fix **What does this PR do? Why is it needed?** Imagine if you want to build mocks for interfaces that are only available on certain operating systems/hardware platforms. In those cases you simply want to add a "manual" tag to the gomock() target, and only rely on it getting built if the resulting Go source file is part of some go_library(). This change adds the "manual" tag to all of the hidden targets of this rule, meaning that their build is skipped completely if the main gomock() target is marked manual as well. **Which issues(s) does this PR fix?** One that requires me to carry a local patch around on the github.com/buildbarn/bb-remote-execution side. **Other notes for review**
1 parent 4c47d52 commit 60290f2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

extras/gomock.bzl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,12 +241,14 @@ def _gomock_reflect(name, library, out, mockgen_tool, **kwargs):
241241
library = library,
242242
out = prog_src_out,
243243
mockgen_tool = mockgen_tool,
244+
tags = ["manual"],
244245
)
245246
prog_bin = name + "_gomock_prog_bin"
246247
go_binary(
247248
name = prog_bin,
248249
srcs = [prog_src_out],
249250
deps = [library, mockgen_model_lib],
251+
tags = ["manual"],
250252
)
251253
_gomock_prog_exec(
252254
name = name,

0 commit comments

Comments
 (0)