jmhodges / bazel_gomock

Code to create Go mocks for bazel targets using mockgen
MIT License
58 stars 30 forks source link

mandatory "interfaces" attribute despite "source" being set #58

Open irfansharif opened 3 years ago

irfansharif commented 3 years ago

This is a very minor "bug". According to the documentation for gomock arguments, interfaces is required if source is unset, and ignored if it is. Despite being ignored, it's still a mandatory attribute when source is set. Removing it from here results in the following error.

@@ -2,7 +2,6 @@
     out = "mocks_generated.go",
     source = "rangefeed.go",
-    interfaces = [""],
     library = ":rangefeed_base",
     package = "rangefeed",
ERROR: /Users/irfansharif/Software/src/github.com/cockroachdb/cockroach/pkg/kv/kvclient/rangefeed/BUILD.bazel:30:7: //pkg/kv/kvclient/rangefeed:mock_rangefeed: missing value for mandatory attribute 'interfaces' in '_gomock_source' rule