Skip to content

Commit

Permalink
Bump go-based bazel rulesets to latest versions
Browse files Browse the repository at this point in the history
  • Loading branch information
shs96c committed Oct 7, 2024
1 parent f4d8048 commit 94bc7c9
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 14 deletions.
9 changes: 2 additions & 7 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,9 @@ bazel_dep(

bazel_dep(
name = "gazelle",
version = "0.36.0",
version = "0.39.1",
repo_name = "bazel_gazelle",
)
git_override(
module_name = "gazelle",
commit = "ba2ce367a545e0bdd74a7abca40ef5e0a0cb8dcb",
remote = "https://github.com/bazelbuild/bazel-gazelle.git",
)

bazel_dep(
name = "protobuf",
Expand All @@ -48,7 +43,7 @@ bazel_dep(
)
bazel_dep(
name = "rules_go",
version = "0.48.1",
version = "0.50.1",
repo_name = "io_bazel_rules_go",
)
bazel_dep(
Expand Down
31 changes: 30 additions & 1 deletion examples/workspace-based/WORKSPACE
Original file line number Diff line number Diff line change
@@ -1,18 +1,47 @@
workspace(name = "contrib_rules_jvm_example_workspace_based")

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

local_repository(
name = "contrib_rules_jvm",
path = "../..",
)

load("@contrib_rules_jvm//:repositories.bzl", "contrib_rules_jvm_deps")
load("@contrib_rules_jvm//:repositories.bzl", "contrib_rules_jvm_deps", "contrib_rules_jvm_gazelle_deps")

contrib_rules_jvm_deps()

load("@contrib_rules_jvm//:setup.bzl", "contrib_rules_jvm_setup")

contrib_rules_jvm_setup()

http_archive(
name = "io_bazel_rules_go",
integrity = "sha256-M6zErg9wUC20uJPJ/B3Xqb+ZjCPn/yxFF3QdQEmpdvg=",
url = "https://github.com/bazelbuild/rules_go/releases/download/v0.48.0/rules_go-v0.48.0.zip",
)

http_archive(
name = "bazel_gazelle",
sha256 = "b760f7fe75173886007f7c2e616a21241208f3d90e8657dc65d36a771e916b6a",
url = "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.39.1/bazel-gazelle-v0.39.1.tar.gz",
)

load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies", "go_repository")

go_rules_dependencies()

go_register_toolchains(version = "1.20.5")

contrib_rules_jvm_gazelle_deps()

gazelle_dependencies()

load("@contrib_rules_jvm//:gazelle_setup.bzl", "contrib_rules_jvm_gazelle_setup")

contrib_rules_jvm_gazelle_setup()

load("@rules_jvm_external//:defs.bzl", "maven_install")

maven_install(
Expand Down
10 changes: 4 additions & 6 deletions repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,11 @@ def contrib_rules_jvm_gazelle_deps():
],
)

# We need https://github.com/bazelbuild/bazel-gazelle/pull/1798
maybe(
http_archive,
name = "bazel_gazelle",
sha256 = "d1d72a9abd6dee362354274fa9b60ced8f50ee1f10f9b9fef90b4acfb98d477b",
strip_prefix = "bazel-gazelle-ba2ce367a545e0bdd74a7abca40ef5e0a0cb8dcb",
url = "https://github.com/bazelbuild/bazel-gazelle/archive/ba2ce367a545e0bdd74a7abca40ef5e0a0cb8dcb.zip",
sha256 = "b760f7fe75173886007f7c2e616a21241208f3d90e8657dc65d36a771e916b6a",
url = "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.39.1/bazel-gazelle-v0.39.1.tar.gz",
)

maybe(
Expand All @@ -126,8 +124,8 @@ def contrib_rules_jvm_gazelle_deps():
maybe(
http_archive,
name = "io_bazel_rules_go",
sha256 = "d6ab6b57e48c09523e93050f13698f708428cfd5e619252e369d377af6597707",
url = "https://github.com/bazelbuild/rules_go/releases/download/v0.43.0/rules_go-v0.43.0.zip",
sha256 = "f4a9314518ca6acfa16cc4ab43b0b8ce1e4ea64b81c38d8a3772883f153346b8",
url = "https://github.com/bazelbuild/rules_go/releases/download/v0.50.1/rules_go-v0.50.1.zip",
)

maybe(
Expand Down

0 comments on commit 94bc7c9

Please sign in to comment.