Skip to content

deps(gazelle): Bump rules_go from 0.41.0 to 0.55.0; gazelle from 0.31.0 (or 0.33.0 for bzlmod) to 0.40.0; go from 1.19.4 to 1.22.0 #2962

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

Open
wants to merge 31 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
262c28f
deps(gazelle): Bump rules_go from 0.41.0 to 0.55.0
dougthor42 Jun 6, 2025
f8e3ffc
missed a sha
dougthor42 Jun 6, 2025
f0921eb
Bump gazelle to 0.40.0, bump go version to 1.22.0
dougthor42 Jun 7, 2025
7b22783
Merge branch 'main' into u/dthor/bump-rules_go-gh2956
dougthor42 Jun 12, 2025
57ab7b6
Maybe bumping gazelle to 0.42.0 helps?
dougthor42 Jun 12, 2025
866938d
rules_go uses gazelle 0.36 for MODULE, lets try that everywhere
dougthor42 Jun 12, 2025
c9a4dc8
rules_go uses gazelle 0.39.1 for WORKSPACE, try that?
dougthor42 Jun 12, 2025
da71e06
Trying various bazel_gazelle versions locally. Ended up on 0.36 for W…
dougthor42 Jun 12, 2025
bdfeb78
call gazelle_dependencies
dougthor42 Jun 19, 2025
bdfc035
Also add go rules deps
dougthor42 Jun 19, 2025
0941488
Buildifier cleanup
dougthor42 Jun 19, 2025
fd7fd51
typo >_<
dougthor42 Jun 19, 2025
2306ff4
fixup some version mismatches
dougthor42 Jun 19, 2025
992ee86
Well that definitely didn't work. Revert "fixup some version mismatches"
dougthor42 Jun 19, 2025
2ada906
GCO_ENABLED=1
dougthor42 Jun 22, 2025
7aa0875
Spell 'cgo' correctly...
dougthor42 Jun 22, 2025
c36a4e6
different cgo
dougthor42 Jun 22, 2025
2d6889c
test env cgo
dougthor42 Jun 22, 2025
cfb5e62
Revert CGO stuff
dougthor42 Jun 23, 2025
73a2f5d
Back to smacker/go-tree-sitter
dougthor42 Jul 6, 2025
3ab53d0
Drop go to 1.19 to match smacker
dougthor42 Jul 6, 2025
611faa5
Revert "Drop go to 1.19 to match smacker"
dougthor42 Jul 6, 2025
406e3d5
official tree-sitter
dougthor42 Jul 6, 2025
b7e3913
Revert "official tree-sitter"
dougthor42 Jul 6, 2025
6849424
1.21.x seems to be a sweet spot, at least locally. But will it work o…
dougthor42 Jul 6, 2025
252ade1
Revert "1.21.x seems to be a sweet spot, at least locally. But will i…
dougthor42 Jul 6, 2025
b0da025
Reapply "official tree-sitter" and fix it up. Doesn't work locally.
dougthor42 Jul 6, 2025
20741ea
Revert "Reapply "official tree-sitter" and fix it up. Doesn't work lo…
dougthor42 Jul 7, 2025
7cc2698
http_archive for smacker/go-tree-sitter
dougthor42 Jul 7, 2025
c3c2a13
Merge branch 'main' into u/dthor/bump-rules_go-gh2956
dougthor42 Jul 7, 2025
27aaec4
hmm...
dougthor42 Jul 8, 2025
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
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,15 @@ END_UNRELEASED_TEMPLATE
* 3.12.11
* 3.14.0b3
* (toolchain) Python 3.13 now references 3.13.5
* (deps[gazelle]) Upgrade versions:
* `rules_go` 0.41.0 -> 0.55.0.
* `gazelle`: WORKSPACE and bzlmod versions now match.
* WORKSPACE: 0.31.0 -> 0.40.0
* bzlmod: 0.33.0 -> 0.40.0
* go: 1.19.4 -> 1.22.0
* Note that this might result in a slight reordering of load statements in
gazelle-generated `BUILD(.bazel)` files to match the ordering set by
buildifier.

{#v0-0-0-fixed}
### Fixed
Expand Down
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ bazel_dep(name = "another_module", version = "0", dev_dependency = True)

# Extra gazelle plugin deps so that WORKSPACE.bzlmod can continue including it for e2e tests.
# We use `WORKSPACE.bzlmod` because it is impossible to have dev-only local overrides.
bazel_dep(name = "rules_go", version = "0.41.0", dev_dependency = True, repo_name = "io_bazel_rules_go")
bazel_dep(name = "rules_go", version = "0.55.0", dev_dependency = True, repo_name = "io_bazel_rules_go")
bazel_dep(name = "rules_python_gazelle_plugin", version = "0", dev_dependency = True)
bazel_dep(name = "gazelle", version = "0.40.0", dev_dependency = True, repo_name = "bazel_gazelle")

Expand Down
14 changes: 7 additions & 7 deletions examples/build_file_generation/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "io_bazel_rules_go",
sha256 = "278b7ff5a826f3dc10f04feaf0b70d48b68748ccd512d7f98bf442077f043fe3",
sha256 = "c6cf9da6668ac84c470c43cbfccb8fdc844ead2b5a8b918e2816d44f2986f644",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.41.0/rules_go-v0.41.0.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.41.0/rules_go-v0.41.0.zip",
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.55.0/rules_go-v0.55.0.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.55.0/rules_go-v0.55.0.zip",
],
)

# Download the bazel_gazelle ruleset.
http_archive(
name = "bazel_gazelle",
sha256 = "d3fa66a39028e97d76f9e2db8f1b0c11c099e8e01bf363a923074784e451f809",
sha256 = "a80893292ae1d78eaeedd50d1cab98f242a17e3d5741b1b9fb58b5fd9d2d57bc",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.33.0/bazel-gazelle-v0.33.0.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.33.0/bazel-gazelle-v0.33.0.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.40.0/bazel-gazelle-v0.40.0.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.40.0/bazel-gazelle-v0.40.0.tar.gz",
],
)

Expand All @@ -49,7 +49,7 @@ go_rules_dependencies()
# go_rules_dependencies is a function that registers external dependencies
# needed by the Go rules.
# See: https://github.com/bazelbuild/rules_go/blob/master/go/dependencies.rst#go_rules_dependencies
go_register_toolchains(version = "1.19.4")
go_register_toolchains(version = "1.22.0")

# The following call configured the gazelle dependencies, Go environment and Go SDK.
gazelle_dependencies()
Expand Down
2 changes: 1 addition & 1 deletion examples/bzlmod_build_file_generation/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ local_path_override(
# The following stanza defines the dependency for gazelle
# See here https://github.com/bazelbuild/bazel-gazelle/releases/ for the
# latest version.
bazel_dep(name = "gazelle", version = "0.30.0", repo_name = "bazel_gazelle")
bazel_dep(name = "gazelle", version = "0.40.0", repo_name = "bazel_gazelle")

# The following stanze returns a proxy object representing a module extension;
# its methods can be invoked to create module extension tags.
Expand Down
15 changes: 12 additions & 3 deletions gazelle/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ module(

bazel_dep(name = "bazel_skylib", version = "1.6.1")
bazel_dep(name = "rules_python", version = "0.18.0")
bazel_dep(name = "rules_go", version = "0.41.0", repo_name = "io_bazel_rules_go")
bazel_dep(name = "gazelle", version = "0.33.0", repo_name = "bazel_gazelle")
bazel_dep(name = "rules_go", version = "0.55.0", repo_name = "io_bazel_rules_go")
bazel_dep(name = "gazelle", version = "0.36.0", repo_name = "bazel_gazelle")
bazel_dep(name = "rules_cc", version = "0.0.16")

local_path_override(
Expand All @@ -21,14 +21,23 @@ use_repo(
go_deps,
"com_github_bazelbuild_buildtools",
"com_github_bmatcuk_doublestar_v4",
"com_github_dougthor42_go_tree_sitter",
"com_github_emirpasic_gods",
"com_github_ghodss_yaml",
"com_github_stretchr_testify",
"in_gopkg_yaml_v2",
"org_golang_x_sync",
)

http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "com_github_smacker_go_tree_sitter",
build_file = "@rules_python_gazelle_plugin//:internal/smacker_BUILD.bazel",
integrity = "sha256-4AkDY4Rh5Auu9Kwzhj5XYSirMLlhmd6ClMWo/r0kmu4=",
strip_prefix = "go-tree-sitter-dd81d9e9be82a8cac96ed1d50c7389c5f1997c02",
url = "https://github.com/smacker/go-tree-sitter/archive/dd81d9e9be82a8cac96ed1d50c7389c5f1997c02.zip",
)

python_stdlib_list = use_extension("//python:extensions.bzl", "python_stdlib_list")
use_repo(
python_stdlib_list,
Expand Down
14 changes: 7 additions & 7 deletions gazelle/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "io_bazel_rules_go",
sha256 = "278b7ff5a826f3dc10f04feaf0b70d48b68748ccd512d7f98bf442077f043fe3",
sha256 = "c6cf9da6668ac84c470c43cbfccb8fdc844ead2b5a8b918e2816d44f2986f644",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.41.0/rules_go-v0.41.0.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.41.0/rules_go-v0.41.0.zip",
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.55.0/rules_go-v0.55.0.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.55.0/rules_go-v0.55.0.zip",
],
)

http_archive(
name = "bazel_gazelle",
sha256 = "29d5dafc2a5582995488c6735115d1d366fcd6a0fc2e2a153f02988706349825",
sha256 = "75df288c4b31c81eb50f51e2e14f4763cb7548daae126817247064637fd9ea62",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.31.0/bazel-gazelle-v0.31.0.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.31.0/bazel-gazelle-v0.31.0.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.36.0/bazel-gazelle-v0.36.0.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.36.0/bazel-gazelle-v0.36.0.tar.gz",
],
)

Expand All @@ -25,7 +25,7 @@ load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_depe

go_rules_dependencies()

go_register_toolchains(version = "1.19.4")
go_register_toolchains(version = "1.22.9")

gazelle_dependencies()

Expand Down
Loading