Skip to content

Commit

Permalink
gazelle: upgrade to v0.39.0 (#7552)
Browse files Browse the repository at this point in the history
With many promising performance updates
https://github.com/bazelbuild/bazel-gazelle/releases/tag/v0.39.0

Also removed `*_for_bzlmod.patch` files.
Thanks to bazel-contrib/bazel-gazelle#1863, using our Gazelle directivies
is sufficient.
  • Loading branch information
sluongng authored Sep 26, 2024
1 parent ec658f9 commit d83c117
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 75 deletions.
11 changes: 1 addition & 10 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ python.toolchain(

bazel_dep(name = "zlib", version = "1.3.1.bcr.3")
bazel_dep(name = "rules_go", version = "0.50.1", repo_name = "io_bazel_rules_go")
bazel_dep(name = "gazelle", version = "0.38.0", repo_name = "bazel_gazelle")
bazel_dep(name = "gazelle", version = "0.39.0", repo_name = "bazel_gazelle")
single_version_override(
module_name = "gazelle",
patch_strip = 1,
Expand Down Expand Up @@ -172,27 +172,18 @@ go_deps.module_override(
go_deps.module_override(
patches = [
"@@//buildpatches:com_github_containerd_containerd_api.patch",
# Can remove once https://github.com/bazelbuild/bazel/issues/23605 is
# merged in bazel 7.4
"@@//buildpatches:com_github_containerd_containerd_api_for_bzlmod.patch",
],
path = "github.com/containerd/containerd/api",
)
go_deps.module_override(
patches = [
"@@//buildpatches:com_github_containerd_ttrpc.patch",
# Can remove once https://github.com/bazelbuild/bazel/issues/23605 is
# merged in bazel 7.4
"@@//buildpatches:com_github_containerd_ttrpc_for_bzlmod.patch",
],
path = "github.com/containerd/ttrpc",
)
go_deps.module_override(
patches = [
"@@//buildpatches:dev_cel_expr.patch",
# Can remove once https://github.com/bazelbuild/bazel/issues/23605 is
# merged in bazel 7.4
"@@//buildpatches:dev_cel_expr_for_bzlmod.patch",
],
path = "cel.dev/expr",
)
Expand Down
6 changes: 3 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ http_archive(

http_archive(
name = "bazel_gazelle",
integrity = "sha256-LHVFzJFKQR5cFcPVWgpe00+/9i3vDh8Ktu0UvaIiw8w=",
patch_args = ["-p1"],
patches = [
"//buildpatches:gazelle.patch",
],
sha256 = "8ad77552825b078a10ad960bec6ef77d2ff8ec70faef2fd038db713f410f5d87",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.38.0/bazel-gazelle-v0.38.0.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.38.0/bazel-gazelle-v0.38.0.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.39.0/bazel-gazelle-v0.39.0.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.39.0/bazel-gazelle-v0.39.0.tar.gz",
],
)

Expand Down
12 changes: 0 additions & 12 deletions buildpatches/com_github_containerd_containerd_api_for_bzlmod.patch

This file was deleted.

12 changes: 0 additions & 12 deletions buildpatches/com_github_containerd_ttrpc_for_bzlmod.patch

This file was deleted.

24 changes: 0 additions & 24 deletions buildpatches/dev_cel_expr_for_bzlmod.patch

This file was deleted.

4 changes: 2 additions & 2 deletions buildpatches/gazelle.patch
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ diff --git a/cmd/gazelle/BUILD.bazel b/cmd/gazelle/BUILD.bazel
name = "gazelle",
languages = DEFAULT_LANGUAGES,
diff --git a/cmd/gazelle/gazelle.go b/cmd/gazelle/gazelle.go
--- a/cmd/gazelle/gazelle.go
+++ b/cmd/gazelle/gazelle.go
--- a/cmd/gazelle/main.go
+++ b/cmd/gazelle/main.go
@@ -56,6 +56,10 @@ func (cmd command) String() string {
}

Expand Down
2 changes: 1 addition & 1 deletion cli/fix/langs/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ go_library(
"@bazel_gazelle//cmd/gazelle:diff.go",
"@bazel_gazelle//cmd/gazelle:fix-update.go",
"@bazel_gazelle//cmd/gazelle:fix.go",
"@bazel_gazelle//cmd/gazelle:gazelle.go",
"@bazel_gazelle//cmd/gazelle:main.go",
"@bazel_gazelle//cmd/gazelle:metaresolver.go",
"@bazel_gazelle//cmd/gazelle:print.go",
"@bazel_gazelle//cmd/gazelle:profiler.go",
Expand Down
8 changes: 4 additions & 4 deletions deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -428,8 +428,8 @@ def install_go_mod_dependencies(workspace_name = "buildbuddy"):
go_repository(
name = "com_github_bazelbuild_bazel_gazelle",
importpath = "github.com/bazelbuild/bazel-gazelle",
sum = "h1:7SABASdzy94tbvklgX8ThG+1y7ZNl2eFYRVevjOXpgw=",
version = "v0.38.0",
sum = "h1:5RCU7g9tWPOa1ySkQgpPRDhiXfG5+38W4acSuKSQyrs=",
version = "v0.39.0",
)
go_repository(
name = "com_github_bazelbuild_bazelisk",
Expand All @@ -443,8 +443,8 @@ def install_go_mod_dependencies(workspace_name = "buildbuddy"):
importpath = "github.com/bazelbuild/buildtools",
patch_args = ["-p1"],
patches = ["@{}//buildpatches:buildifier.patch".format(workspace_name)],
sum = "h1:3UwzfrfwoxlyGlPhbQR1O1HLOd4qNEyAwxHRSE+Yde4=",
version = "v0.0.0-20240606140350-80f1f6802857",
sum = "h1:/wpuwyWvp46gZfQCmbR+4SI5ne7IjRUM5lsXTzpAeWM=",
version = "v0.0.0-20240827154017-dd10159baa91",
)
go_repository(
name = "com_github_bazelbuild_rules_go",
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ require (
github.com/aws/aws-sdk-go-v2/service/sts v1.19.2
github.com/aws/smithy-go v1.13.5
github.com/awslabs/soci-snapshotter v0.1.0
github.com/bazelbuild/bazel-gazelle v0.38.0
github.com/bazelbuild/bazel-gazelle v0.39.0
github.com/bazelbuild/bazelisk v1.19.0
github.com/bazelbuild/buildtools v0.0.0-20240606140350-80f1f6802857
github.com/bazelbuild/buildtools v0.0.0-20240827154017-dd10159baa91
github.com/bazelbuild/rules_go v0.50.1
github.com/bazelbuild/rules_webtesting v0.0.0-20210910170740-6b2ef24cfe95
github.com/bduffany/godemon v0.0.0-20221115232931-09721d48e30e
Expand Down
9 changes: 4 additions & 5 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -250,12 +250,12 @@ github.com/aws/aws-sdk-go-v2/service/sts v1.19.2 h1:XFJ2Z6sNUUcAz9poj+245DMkrHE4
github.com/aws/aws-sdk-go-v2/service/sts v1.19.2/go.mod h1:dp0yLPsLBOi++WTxzCjA/oZqi6NPIhoR+uF7GeMU9eg=
github.com/aws/smithy-go v1.13.5 h1:hgz0X/DX0dGqTYpGALqXJoRKRj5oQ7150i5FdTePzO8=
github.com/aws/smithy-go v1.13.5/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA=
github.com/bazelbuild/bazel-gazelle v0.38.0 h1:7SABASdzy94tbvklgX8ThG+1y7ZNl2eFYRVevjOXpgw=
github.com/bazelbuild/bazel-gazelle v0.38.0/go.mod h1:hspieDFb3FIjjhQV/dZjqq8qiVxsQ4rtRiWNZMihEXg=
github.com/bazelbuild/bazel-gazelle v0.39.0 h1:5RCU7g9tWPOa1ySkQgpPRDhiXfG5+38W4acSuKSQyrs=
github.com/bazelbuild/bazel-gazelle v0.39.0/go.mod h1:3vVgNuO49N8bghRC63OY+MHWalzXyoI9nH6XeEjf1lQ=
github.com/bazelbuild/bazelisk v1.19.0 h1:TOh9touXYcKKiZqE+Dj4XD/FHrzsqmu9iDvPTsW9jIc=
github.com/bazelbuild/bazelisk v1.19.0/go.mod h1:EwrQdJpNWr17zu6UWVk49YBNZ9MkIgTkOUwfTIeaRnc=
github.com/bazelbuild/buildtools v0.0.0-20240606140350-80f1f6802857 h1:3UwzfrfwoxlyGlPhbQR1O1HLOd4qNEyAwxHRSE+Yde4=
github.com/bazelbuild/buildtools v0.0.0-20240606140350-80f1f6802857/go.mod h1:689QdV3hBP7Vo9dJMmzhoYIyo/9iMhEmHkJcnaPRCbo=
github.com/bazelbuild/buildtools v0.0.0-20240827154017-dd10159baa91 h1:/wpuwyWvp46gZfQCmbR+4SI5ne7IjRUM5lsXTzpAeWM=
github.com/bazelbuild/buildtools v0.0.0-20240827154017-dd10159baa91/go.mod h1:PLNUetjLa77TCCziPsz0EI8a6CUxgC+1jgmWv0H25tg=
github.com/bazelbuild/rules_go v0.50.1 h1:/BUvuaB8MEiUA2oLPPCGtuw5V+doAYyiGTFyoSWlkrw=
github.com/bazelbuild/rules_go v0.50.1/go.mod h1:Dhcz716Kqg1RHNWos+N6MlXNkjNP2EwZQ0LukRKJfMs=
github.com/bazelbuild/rules_webtesting v0.0.0-20210910170740-6b2ef24cfe95 h1:zmBkl2nxjRojoW9PtGVEtW/91kHieotlD7cL9vFq06c=
Expand Down Expand Up @@ -1790,7 +1790,6 @@ go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqe
go.opentelemetry.io/proto/otlp v0.11.0/go.mod h1:QpEjXPrNQzrFDZgoTo49dgHR9RYRSrg3NAKnUGl9YpQ=
go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I=
go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM=
go.starlark.net v0.0.0-20210223155950-e043a3d3c984/go.mod h1:t3mmBBPzAVvK0L0n1drDmrQsJ8FoIx4INCqVMTr/Zo0=
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
Expand Down

0 comments on commit d83c117

Please sign in to comment.