diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 317830cca..1d416c74d 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -11,7 +11,6 @@ tasks: ubuntu2204: name: Ubuntu 22.04 with WORKSPACE platform: ubuntu2204 - bazel: 7.1.1 build_flags: - "--noexperimental_enable_bzlmod" test_flags: @@ -27,7 +26,6 @@ tasks: ubuntu2204_bzlmod: name: Ubuntu 22.04 with Bzlmod platform: ubuntu2204 - bazel: 7.1.1 build_targets: - "..." run_targets: @@ -88,7 +86,6 @@ tasks: macos_arm64_bzlmod: name: Mac OS Arm 64 with Bzlmod platform: macos_arm64 - bazel: 7.1.1 build_targets: - "..." test_targets: @@ -98,7 +95,6 @@ tasks: macos_arm64: name: Mac OS Arm 64 with WORKSPACE platform: macos_arm64 - bazel: 7.1.1 build_flags: - "--noexperimental_enable_bzlmod" test_flags: @@ -113,7 +109,6 @@ tasks: macos_bzlmod: name: Mac OS with Bzlmod platform: macos - bazel: 7.1.1 build_targets: - "..." test_targets: @@ -123,7 +118,6 @@ tasks: macos: name: Mac OS with WORKSPACE platform: macos - bazel: 7.1.1 build_flags: - "--noexperimental_enable_bzlmod" test_flags: @@ -135,7 +129,6 @@ tasks: windows_bzlmod: name: Windows with Bzlmod platform: windows - bazel: 7.1.1 build_targets: - "--" - "..." @@ -159,7 +152,6 @@ tasks: windows: name: Windows with WORKSPACE platform: windows - bazel: 7.1.1 build_flags: - "--noexperimental_enable_bzlmod" test_flags: @@ -186,7 +178,6 @@ tasks: incompatible: name: Ubuntu 22.04 with WORKSPACE and --config=incompatible platform: ubuntu2204 - bazel: 7.1.1 build_flags: - "--noexperimental_enable_bzlmod" - "--config=incompatible" diff --git a/.bazelversion b/.bazelversion index ba7f754d0..35907cd9c 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -7.4.0 +7.x diff --git a/BUILD.bazel b/BUILD.bazel index 5b4ead8dd..e073e04ef 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -39,8 +39,8 @@ gazelle_binary( ) go_cross_binary( - name = "gazelle_local_go1.19", - sdk_version = "1.19", + name = "gazelle_local_go1.20", + sdk_version = "1.20", target = ":gazelle_local", ) diff --git a/MODULE.bazel b/MODULE.bazel index 9e6b696b4..69b40c315 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -60,10 +60,10 @@ bazel_dep(name = "bazel_skylib_gazelle_plugin", version = "1.4.1", dev_dependenc bazel_dep(name = "stardoc", version = "0.6.2", dev_dependency = True, repo_name = "io_bazel_stardoc") go_sdk_dev = use_extension("@io_bazel_rules_go//go:extensions.bzl", "go_sdk", dev_dependency = True) -go_sdk_dev.download(version = "1.23.2") +go_sdk_dev.download(version = "1.23.3") # Used by compatibility tests, keep as low as possible. -go_sdk_dev.download(version = "1.19.13") +go_sdk_dev.download(version = "1.20.14") # Known to exist since it is instantiated by rules_go itself. use_repo( diff --git a/WORKSPACE b/WORKSPACE index a76be9d03..01aee392a 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -38,7 +38,7 @@ load("@io_bazel_rules_go//go:deps.bzl", "go_download_sdk", "go_register_nogo", " go_rules_dependencies() -go_register_toolchains(version = "1.23.2") +go_register_toolchains(version = "1.23.3") go_register_nogo( excludes = [ @@ -49,9 +49,11 @@ go_register_nogo( nogo = "@bazel_gazelle//:nogo", ) +# Go 1.20 is needed so support nogo's use of token.File.FileStart. +# Go 1.19 is needed for recent versions of golang.org/x/tools. go_download_sdk( name = "go_compat_sdk", - version = "1.19.13", + version = "1.20.14", ) load("//:deps.bzl", "gazelle_dependencies") diff --git a/cmd/fetch_repo/BUILD.bazel b/cmd/fetch_repo/BUILD.bazel index 470cf377a..62aea7afb 100644 --- a/cmd/fetch_repo/BUILD.bazel +++ b/cmd/fetch_repo/BUILD.bazel @@ -26,10 +26,10 @@ go_binary( visibility = ["//visibility:public"], ) -# Verify that fetch_repo builds with Go 1.19. +# Verify that fetch_repo builds with Go 1.20. go_cross_binary( - name = "fetch_repo_go1.19", - sdk_version = "1.19", + name = "fetch_repo_go1.20", + sdk_version = "1.20", target = ":fetch_repo", ) diff --git a/go.mod b/go.mod index 84e5d0147..e6fffd962 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,8 @@ module github.com/bazelbuild/bazel-gazelle -go 1.22.0 +go 1.22 -toolchain go1.23.2 +toolchain go1.23.3 require ( github.com/bazelbuild/buildtools v0.0.0-20240918101019-be1c24cc9a44 diff --git a/tests/bcr/go_mod/.bazelversion b/tests/bcr/go_mod/.bazelversion index ba7f754d0..35907cd9c 100644 --- a/tests/bcr/go_mod/.bazelversion +++ b/tests/bcr/go_mod/.bazelversion @@ -1 +1 @@ -7.4.0 +7.x diff --git a/tests/bcr/go_mod/MODULE.bazel b/tests/bcr/go_mod/MODULE.bazel index 3580320ac..0317b6021 100644 --- a/tests/bcr/go_mod/MODULE.bazel +++ b/tests/bcr/go_mod/MODULE.bazel @@ -22,6 +22,7 @@ bazel_dep(name = "rules_proto", version = "6.0.0-rc2", repo_name = "my_rules_pro bazel_dep(name = "rules_testing", version = "0.6.0") go_sdk = use_extension("@my_rules_go//go:extensions.bzl", "go_sdk") +go_sdk.download(version = "1.23.3") # This bazel_dep provides the Go dependency github.com/cloudflare/circl, which requires custom # patches beyond what Gazelle can generate. diff --git a/tests/bcr/go_work/.bazelversion b/tests/bcr/go_work/.bazelversion index ba7f754d0..35907cd9c 100644 --- a/tests/bcr/go_work/.bazelversion +++ b/tests/bcr/go_work/.bazelversion @@ -1 +1 @@ -7.4.0 +7.x diff --git a/tests/bcr/go_work/MODULE.bazel b/tests/bcr/go_work/MODULE.bazel index c4d43ffb1..314d4a472 100644 --- a/tests/bcr/go_work/MODULE.bazel +++ b/tests/bcr/go_work/MODULE.bazel @@ -19,6 +19,7 @@ bazel_dep(name = "rules_go", version = "0.50.1", repo_name = "my_rules_go") bazel_dep(name = "rules_proto", version = "6.0.0-rc2", repo_name = "my_rules_proto") go_sdk = use_extension("@my_rules_go//go:extensions.bzl", "go_sdk") +go_sdk.download(version = "1.23.3") # This bazel_dep provides the Go dependency github.com/cloudflare/circl, which requires custom # patches beyond what Gazelle can generate.