What version of rules_go are you using?
v0.34.0
What version of gazelle are you using?
v0.25.0
What version of Bazel are you using?
Bazelisk version: v1.11.0
Build label: 5.2.0
Build target: bazel-out/darwin_arm64-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Tue Jun 7 16:11:09 2022 (1654618269)
Build timestamp: 1654618269
Build timestamp as int: 1654618269
Does this issue reproduce with the latest releases of all the above?
Yes
What operating system and processor architecture are you using?
OS: macOS Monterey v12.5
Architecture: Apple M1 (arm64) Max
Model: MacBook Pro (16-inch, 2021)
Any other potentially useful information about your toolchain?
N/A
What did you do?
After upgrading to rules_go v0.34.0, I tried to build a docker image for my go application by running:
bazel run //my/foo/bar:server_image -- --norun
What did you expect to see?
A successful build of the docker image, followed by loading and tagging the image.
What did you see instead?
I get the error below when building the docker image with rules_go v0.34.0.
My go_binary targets still work, but my go_image targets (using rules_docker) give me an error.
Note: Switching back to v0.33.0 (or any of the previous 5 releases) makes the error go away. The issue only presents when I use rules_go v0.34.0. I switched nothing else in the entire workspace between testing different versions.
ERROR: /private/var/tmp/_bazel_stabai/9072a78e88c27b50b7aa1da1fa2eec2e/external/io_bazel_rules_go/BUILD.bazel:86:17: While resolving toolchains for target @io_bazel_rules_go//:cgo_context_data: No matching toolchains found for types @bazel_tools//tools/cpp:toolchain_type. Maybe --incompatible_use_cc_configure_from_rules_cc has been flipped and there is no default C++ toolchain added in the WORKSPACE file? See https://github.com/bazelbuild/bazel/issues/10134 for details and migration instructions.
ERROR: Analysis of target '//my/foo/bar:server_image' failed; build aborted:
INFO: Elapsed time: 34.179s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (157 packages loaded, 9786 targets configured)
FAILED: Build did NOT complete successfully (157 packages loaded, 9786 targets configured)
Fetching @org_golang_google_protobuf; fetching
Fetching @com_github_desertbit_timer; fetching
Fetching @org_golang_x_net; fetching
Fetching @com_github_cenkalti_backoff_v4; fetching
Fetching @io_nhooyr_websocket; fetching
Fetching @com_github_golang_protobuf; fetching
Fetching @go_googleapis; Restarting.
What version of rules_go are you using?
v0.34.0
What version of gazelle are you using?
v0.25.0
What version of Bazel are you using?
Bazelisk version: v1.11.0
Build label: 5.2.0
Build target: bazel-out/darwin_arm64-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Tue Jun 7 16:11:09 2022 (1654618269)
Build timestamp: 1654618269
Build timestamp as int: 1654618269
Does this issue reproduce with the latest releases of all the above?
Yes
What operating system and processor architecture are you using?
OS: macOS Monterey v12.5
Architecture: Apple M1 (arm64) Max
Model: MacBook Pro (16-inch, 2021)
Any other potentially useful information about your toolchain?
N/A
What did you do?
After upgrading to rules_go v0.34.0, I tried to build a docker image for my go application by running:
What did you expect to see?
A successful build of the docker image, followed by loading and tagging the image.
What did you see instead?
I get the error below when building the docker image with rules_go v0.34.0.
My
go_binarytargets still work, but mygo_imagetargets (using rules_docker) give me an error.Note: Switching back to v0.33.0 (or any of the previous 5 releases) makes the error go away. The issue only presents when I use rules_go v0.34.0. I switched nothing else in the entire workspace between testing different versions.