I'm getting this error: undefined: gomock.AssignableToTypeOf It is occurring while using function gomock.AssignableToTypeOf of package github.com/golang/mock"
This starts occurring when I have Updated versions in the WORKSPACE file of Project, and the error which I'm getting while executing bazel coverage
command is undefined: gomock.AssignableToTypeOf
Bazel Version: 4.2.1
Bazel Rules Version: v0.30.0
bazel_gazelle Version: v0.24.0
Go Version: 1.17.6
Docker Rules Version: 0.23.0
It was working fine on the previous versions -- Bazel Version: 3.7.1 Bazel Rules Version: v0.27.0 bazel_gazelle Version: v0.23.0 Go Version: 1.16 Docker Rules Version: 0.14.4
Here's the code snippet of the WORKSPACE file.
# Fetch Golang mock
go_repository(
name = "com_github_golang_mock",
# commit = "aba2ff9a6844d5e3289e8472d3217d5b3090f083",
tag = "v1.6.0",
importpath = "github.com/golang/mock",
)
go_repository(
name = "go_googleapis",
# commit = "aba2ff9a6844d5e3289e8472d3217d5b3090f083",
tag = "v0.69.0",
importpath = "github.com/googleapis/google-api-go-client",
)
go_repository(
name = "org_golang_google_genproto",
tag = "v0.0.0-20220216160803-4663080d8bc8",
importpath = "google.golang.org/genproto",
)
go_repository(
name = "org_golang_x_mod",
importpath = "golang.org/x/mod",
tag = "v0.5.1",
)
go_repository(
name = "org_golang_x_xerrors",
importpath = "golang.org/x/xerrors",
sum = "h1:/atklqdjdhuosWIl6AIbOeHJjicWYPqR9bpxqxYG2pA=",
version = "v0.0.0-20191011141410-1b5146add898",
)
go_repository(
name = "com_github_jmhodges_bazel_gomock",
tag = "v1.3",
importpath = "github.com/jmhodges/bazel_gomock",
)