Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
sluongng and fmeum authored Jan 16, 2025
1 parent 7374931 commit dd1ee34
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 68 deletions.
19 changes: 3 additions & 16 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ 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.39.0", repo_name = "bazel_gazelle")
bazel_dep(name = "rules_go", version = "0.51.0", repo_name = "io_bazel_rules_go")
bazel_dep(name = "gazelle", version = "0.41.0", repo_name = "bazel_gazelle")
single_version_override(
module_name = "gazelle",
patch_strip = 1,
Expand Down Expand Up @@ -185,12 +185,6 @@ go_deps.module_override(
],
path = "github.com/containerd/ttrpc",
)
go_deps.module_override(
patches = [
"@@//buildpatches:dev_cel_expr.patch",
],
path = "cel.dev/expr",
)

# Go repos with custom directives
go_deps.gazelle_override(
Expand Down Expand Up @@ -258,15 +252,8 @@ go_deps.gazelle_override(
"gazelle:proto file",
"gazelle:proto_strip_import_prefix /proto/cel/expr",
"gazelle:proto_import_prefix cel/expr",
"gazelle:resolve proto go google/api/expr/v1alpha1/checked.proto @org_golang_google_genproto_googleapis_rpc//api/expr/v1alpha1:checked_proto",
"gazelle:resolve proto go google/api/expr/v1alpha1/eval.proto @org_golang_google_genproto_googleapis_rpc//api/expr/v1alpha1:eval_proto",
"gazelle:resolve proto go google/api/expr/v1alpha1/value.proto @org_golang_google_genproto_googleapis_rpc//api/expr/v1alpha1:value_proto",
"gazelle:resolve proto google/rpc/status.proto @@//:googleapis_status_proto",
"gazelle:resolve proto go google/rpc/status.proto @org_golang_google_genproto_googleapis_rpc//status",
"gazelle:resolve proto proto google/rpc/status.proto @@//:googleapis_status_proto",
"gazelle:resolve proto go cel/expr/syntax.proto //proto/cel/expr:syntax_go_proto",
"gazelle:resolve proto proto cel/expr/syntax.proto //proto/cel/expr:syntax_proto",
"gazelle:resolve proto go cel/expr/value.proto //proto/cel/expr:value_go_proto",
"gazelle:resolve proto proto cel/expr/value.proto //proto/cel/expr:value_proto",
],
path = "cel.dev/expr",
)
Expand Down
12 changes: 6 additions & 6 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -46,23 +46,23 @@ http_archive(
# keep in sync with go.mod
http_archive(
name = "io_bazel_rules_go",
integrity = "sha256-9KkxRRjKas+hbMSrQ7C4zh5OpkuBw42KN3KIPxUzRrg=",
integrity = "sha256-CTbJvDxDIe43LLj2bdly02jLlA7QGpup/X3rzwCT8Js=",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.50.1/rules_go-v0.50.1.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.50.1/rules_go-v0.50.1.zip",
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.51.0/rules_go-v0.51.0.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.51.0/rules_go-v0.51.0.zip",
],
)

http_archive(
name = "bazel_gazelle",
integrity = "sha256-LHVFzJFKQR5cFcPVWgpe00+/9i3vDh8Ktu0UvaIiw8w=",
integrity = "sha256-rvvy/Hx2Fsntc6o9UcdxAHJNWzzmbPoWQG6ME+h8i1I=",
patch_args = ["-p1"],
patches = [
"//buildpatches:gazelle.patch",
],
urls = [
"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",
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.41.0/bazel-gazelle-v0.41.0.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.41.0/bazel-gazelle-v0.41.0.tar.gz",
],
)

Expand Down
14 changes: 0 additions & 14 deletions buildpatches/dev_cel_expr.patch

This file was deleted.

26 changes: 9 additions & 17 deletions deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -429,8 +429,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:5RCU7g9tWPOa1ySkQgpPRDhiXfG5+38W4acSuKSQyrs=",
version = "v0.39.0",
sum = "h1:blh57YCxe3QNFbzRtEuLxaak+f5KYSQynznGnUNDRc4=",
version = "v0.41.0",
)
go_repository(
name = "com_github_bazelbuild_bazelisk",
Expand All @@ -444,14 +444,14 @@ 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:/wpuwyWvp46gZfQCmbR+4SI5ne7IjRUM5lsXTzpAeWM=",
version = "v0.0.0-20240827154017-dd10159baa91",
sum = "h1:FGzENZi+SX9I7h9xvMtRA3rel8hCEfyzSixteBgn7MU=",
version = "v0.0.0-20240918101019-be1c24cc9a44",
)
go_repository(
name = "com_github_bazelbuild_rules_go",
importpath = "github.com/bazelbuild/rules_go",
sum = "h1:/BUvuaB8MEiUA2oLPPCGtuw5V+doAYyiGTFyoSWlkrw=",
version = "v0.50.1",
sum = "h1:og6AqW7T4uFgcySRYn/EFg5VUHR2KY7jypYmVeIGh9k=",
version = "v0.51.0",
)
go_repository(
name = "com_github_bazelbuild_rules_webtesting",
Expand Down Expand Up @@ -552,8 +552,8 @@ def install_go_mod_dependencies(workspace_name = "buildbuddy"):
go_repository(
name = "com_github_bmatcuk_doublestar_v4",
importpath = "github.com/bmatcuk/doublestar/v4",
sum = "h1:FH9SifrbvJhnlQpztAx++wlkk70QBf0iBWDwNy7PA4I=",
version = "v4.6.1",
sum = "h1:fdDeAqgT47acgwd9bd9HxJRDmc9UAmPpc+2m0CXv75Q=",
version = "v4.7.1",
)
go_repository(
name = "com_github_bmizerany_assert",
Expand Down Expand Up @@ -5617,19 +5617,11 @@ def install_go_mod_dependencies(workspace_name = "buildbuddy"):
"gazelle:proto file",
"gazelle:proto_strip_import_prefix /proto/cel/expr",
"gazelle:proto_import_prefix cel/expr",
"gazelle:resolve proto go google/api/expr/v1alpha1/checked.proto @org_golang_google_genproto_googleapis_rpc//api/expr/v1alpha1:checked_proto",
"gazelle:resolve proto go google/api/expr/v1alpha1/eval.proto @org_golang_google_genproto_googleapis_rpc//api/expr/v1alpha1:eval_proto",
"gazelle:resolve proto go google/api/expr/v1alpha1/value.proto @org_golang_google_genproto_googleapis_rpc//api/expr/v1alpha1:value_proto",
"gazelle:resolve proto proto google/rpc/status.proto @googleapis//google/rpc:status_proto",
"gazelle:resolve proto google/rpc/status.proto @googleapis//google/rpc:status_proto",
"gazelle:resolve proto go google/rpc/status.proto @org_golang_google_genproto_googleapis_rpc//status",
"gazelle:resolve proto go cel/expr/syntax.proto //proto/cel/expr:syntax_go_proto",
"gazelle:resolve proto proto cel/expr/syntax.proto //proto/cel/expr:syntax_proto",
"gazelle:resolve proto go cel/expr/value.proto //proto/cel/expr:value_go_proto",
"gazelle:resolve proto proto cel/expr/value.proto //proto/cel/expr:value_proto",
],
build_file_generation = "clean",
importpath = "cel.dev/expr",
patches = ["@{}//buildpatches:dev_cel_expr.patch".format(workspace_name)],
sum = "h1:O1jzfJCQBfL5BFoYktaxwIhuttaQPsVWerH9/EEKx0w=",
version = "v0.15.0",
)
Expand Down
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ 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.39.0
github.com/bazelbuild/bazel-gazelle v0.41.0
github.com/bazelbuild/bazelisk v1.19.0
github.com/bazelbuild/buildtools v0.0.0-20240827154017-dd10159baa91
github.com/bazelbuild/rules_go v0.50.1
github.com/bazelbuild/buildtools v0.0.0-20240918101019-be1c24cc9a44
github.com/bazelbuild/rules_go v0.51.0
github.com/bazelbuild/rules_webtesting v0.0.0-20210910170740-6b2ef24cfe95
github.com/bduffany/godemon v0.0.0-20221115232931-09721d48e30e
github.com/bits-and-blooms/bloom/v3 v3.7.0
Expand Down Expand Up @@ -206,7 +206,7 @@ require (
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
github.com/bits-and-blooms/bitset v1.14.3 // indirect
github.com/blang/semver v3.5.1+incompatible // indirect
github.com/bmatcuk/doublestar/v4 v4.6.1 // indirect
github.com/bmatcuk/doublestar/v4 v4.7.1 // indirect
github.com/bufbuild/protocompile v0.5.1 // indirect
github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect
github.com/chzyer/readline v1.5.1 // indirect
Expand Down
16 changes: 8 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -249,14 +249,14 @@ 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.39.0 h1:5RCU7g9tWPOa1ySkQgpPRDhiXfG5+38W4acSuKSQyrs=
github.com/bazelbuild/bazel-gazelle v0.39.0/go.mod h1:3vVgNuO49N8bghRC63OY+MHWalzXyoI9nH6XeEjf1lQ=
github.com/bazelbuild/bazel-gazelle v0.41.0 h1:blh57YCxe3QNFbzRtEuLxaak+f5KYSQynznGnUNDRc4=
github.com/bazelbuild/bazel-gazelle v0.41.0/go.mod h1:SRCc60YGZ27y+BqLzQ+nMh249+FyZz7YtX/V2ng+/z4=
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-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/buildtools v0.0.0-20240918101019-be1c24cc9a44 h1:FGzENZi+SX9I7h9xvMtRA3rel8hCEfyzSixteBgn7MU=
github.com/bazelbuild/buildtools v0.0.0-20240918101019-be1c24cc9a44/go.mod h1:PLNUetjLa77TCCziPsz0EI8a6CUxgC+1jgmWv0H25tg=
github.com/bazelbuild/rules_go v0.51.0 h1:og6AqW7T4uFgcySRYn/EFg5VUHR2KY7jypYmVeIGh9k=
github.com/bazelbuild/rules_go v0.51.0/go.mod h1:+jnXOJJO4C+WYH5v1v0SsPTncQ9sHGsCrAOgrflqSUE=
github.com/bazelbuild/rules_webtesting v0.0.0-20210910170740-6b2ef24cfe95 h1:zmBkl2nxjRojoW9PtGVEtW/91kHieotlD7cL9vFq06c=
github.com/bazelbuild/rules_webtesting v0.0.0-20210910170740-6b2ef24cfe95/go.mod h1:M+vCvqp/1BViNuVL630BoiGqld9Q1vQzvf9bN/dWTeg=
github.com/bduffany/godemon v0.0.0-20221115232931-09721d48e30e h1:Th4pNly+xoH2szOq4aA+uAFmg5h37BCyq3pFqnZGJ70=
Expand Down Expand Up @@ -287,8 +287,8 @@ github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJm
github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ=
github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
github.com/bmatcuk/doublestar/v4 v4.6.1 h1:FH9SifrbvJhnlQpztAx++wlkk70QBf0iBWDwNy7PA4I=
github.com/bmatcuk/doublestar/v4 v4.6.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc=
github.com/bmatcuk/doublestar/v4 v4.7.1 h1:fdDeAqgT47acgwd9bd9HxJRDmc9UAmPpc+2m0CXv75Q=
github.com/bmatcuk/doublestar/v4 v4.7.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc=
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4=
github.com/bojand/ghz v0.120.0 h1:6F4wsmZVwFg5UnD+/R+IABWk6sKE/0OKIBdUQUZnOdo=
github.com/bojand/ghz v0.120.0/go.mod h1:HfECuBZj1v02XObGnRuoZgyB1PR24/25dIYiJIMjJnE=
Expand Down
5 changes: 2 additions & 3 deletions rules/go/index.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ def _go_sdk_tool_impl(ctx):
tool_path = paths.join(sdk.root_file.dirname, ctx.attr.goroot_relative_path)
tool = None

sdk_tools = []
sdk_tools.append(sdk.go) # `go` binary
sdk_tools.extend(sdk.tools) # all other tools, e.g. `gofmt`
sdk_tools = [sdk.go] # `go` binary
sdk_tools.extend(sdk.tools.to_list()) # all other tools, e.g. `gofmt`

for f in sdk_tools:
if f.path == tool_path:
Expand Down

0 comments on commit dd1ee34

Please sign in to comment.