golang / mock

GoMock is a mocking framework for the Go programming language.
Apache License 2.0
9.26k stars 608 forks source link

undefined: gomock.AssignableToTypeOf while using github third party package "github.com/golang/mock" in Golang Project using bazel as a Build tool #624

Closed divesh979 closed 2 years ago

divesh979 commented 2 years ago

Actual behavior A clear and concise description of what the bug is.

The issue is undefined: gomock.AssignableToTypeOf Occuring While using function gomock.AssignableToTypeOf of package "github.com/golang/mock"

Expected behavior A clear and concise description of what you expected to happen.

No issues should occur while using function gomock.AssignableToTypeOf of package "github.com/golang/mock"

To Reproduce Steps to reproduce the behavior

Issues There is No code changes Done Just the Update of Versions in WORKSPACE file of Project and issue undefined: gomock.AssignableToTypeOf starts appearing 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

Additional Information

Triage Notes for the Maintainers

Please Test with all Latest Versions of 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 and let us know behaviour

codyoss commented 2 years ago

This seems like an issue in your bazel environment and not gomock. I know there is a community maintained plguin deal for using gomock from bazel. Maybe try asking for help there, I don't have too much experience in this area.