Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

examples: Update rules_go version for incoming incompatible change #3387

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,9 @@ tasks:
name: Examples test on Ubuntu
platform: ubuntu2004
working_directory: examples/basic-gazelle
build_flags:
- "--incompatible_config_setting_private_default_visibility"
- "--incompatible_enforce_config_setting_visibility"
build_targets:
- "//..."
test_targets:
Expand All @@ -351,14 +354,20 @@ tasks:
name: Examples test on MacOS
platform: macos
working_directory: examples/basic-gazelle
build_flags:
- "--incompatible_config_setting_private_default_visibility"
- "--incompatible_enforce_config_setting_visibility"
build_targets:
- "//..."
test_targets:
- "//..."
windows_examples:
platform: windows
name: Examples test on Windows
platform: windows
working_directory: examples/basic-gazelle
build_flags:
- "--incompatible_config_setting_private_default_visibility"
- "--incompatible_enforce_config_setting_visibility"
# Go requires a C toolchain that accepts options and emits errors like
# gcc or clang. The Go SDK does not support MSVC.
- "--cpu=x64_windows"
Expand All @@ -370,7 +379,6 @@ tasks:
- "--host_platform=@io_bazel_rules_go//go/toolchain:windows_amd64_cgo"
- "--platforms=@io_bazel_rules_go//go/toolchain:windows_amd64_cgo"
- "--incompatible_enable_cc_toolchain_resolution"
working_directory: examples/basic-gazelle
build_targets:
- "//..."
test_targets:
Expand Down
8 changes: 4 additions & 4 deletions examples/basic-gazelle/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# checks the sha.
http_archive(
name = "io_bazel_rules_go",
sha256 = "099a9fb96a376ccbbb7d291ed4ecbdfd42f6bc822ab77ae6f1b5cb9e914e94fa",
sha256 = "56d8c5a5c91e1af73eca71a6fab2ced959b67c86d12ba37feedb0a2dfea441a6",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.35.0/rules_go-v0.35.0.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.35.0/rules_go-v0.35.0.zip",
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.37.0/rules_go-v0.37.0.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.37.0/rules_go-v0.37.0.zip",
],
)

Expand Down Expand Up @@ -59,7 +59,7 @@ go_rules_dependencies()
# The next rule installs the Go toolchains. The Go version is specified
# using the version parameter. This rule will download the Go SDK.
# https://github.com/bazelbuild/rules_go/blob/master/go/toolchains.rst#go_register_toolchains
go_register_toolchains(version = "1.19.1")
go_register_toolchains(version = "1.19.3")

# The following call configured the gazelle dependencies, Go environment and Go SDK.
gazelle_dependencies()
6 changes: 0 additions & 6 deletions examples/basic-gazelle/pkg/roll/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ go_library(
deps = ["@io_k8s_klog_v2//:klog"],
)

go_test(
name = "roll_dice_test",
srcs = ["roll_dice_test.go"],
embed = [":roll"],
)

go_test(
name = "roll_test",
srcs = ["roll_dice_test.go"],
Expand Down