jmhodges / bazel_gomock

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

Broken with bazel_gazelle 0.22.0? #47

Open johanbrandhorst opened 3 years ago

johanbrandhorst commented 3 years ago

Hi,

Thanks for this excellent package and all your work in the Go bazel community at large. I've been using the gomock rule my experimental bazel monorepo and it seems to break when upgrading to bazel_gazelle 0.22.0. I'm not sure if it's my side or the rule. This is the error I'm seeing:


ERROR: /tmp/build_output/external/com_github_golang_mock/mockgen/BUILD.bazel:3:11: no such target '@org_golang_x_tools//go/packages:packages': target 'packages' not declared in package 'go/packages' (did you mean 'packages.go'?) defined by /tmp/build_output/external/org_golang_x_tools/go/packages/BUILD.bazel and referenced by '@com_github_golang_mock//mockgen:mockgen_lib'
Analyzing: 18 targets (88 packages loaded, 6730 targets configured)
ERROR: Analysis of target '//cmd/go-server/users:list_users_service_mock' failed; build aborted: Analysis failed

More details here:

Job log, Pull request.