I'm on MacOS 10.13.2. Go 1.10. bazel 0.11.1
I need to compile a repo that has 2 projects (project1 and project2). project1 has 2 subpacakges. p1lib and dep1 p1lib uses dep1.
I generate BUILD files with gazelle, files look ok.
gazelle -go_prefix=github.com/BazelBuildForGo
But when I run build I get an error that says that I'm missing direct dependency.
bazel build //project1
INFO: Analysed target //project1:project1 (3 packages loaded).
INFO: Found 1 target...
ERROR: /private/var/tmp/_bazel_user1/df78026a5ee0c7ed3d23dd05c3a3b1f7/external/com_github_wix_private_bazelbuildforgo/project1/p1lib/BUILD.bazel:3:1: GoCompile external/com_github_wix_private_bazelbuildforgo/project1/p1lib/darwin_amd64_stripped/go_default_library~/github.com/BazelBuildForGo/project1/p1lib.a failed (Exit 1)
2018/03/25 18:02:55 missing strict dependencies:
external/com_github_wix_private_bazelbuildforgo/project1/p1lib/p1lib.go: import of github.com/wix-private/BazelBuildForGo/project1/dep1, which is not a direct dependency
Target //project1:project1 failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 0.358s, Critical Path: 0.12s
FAILED: Build did NOT complete successfully
My project can be found here https://github.com/wix-playground/BazelBuildForGo