Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module(
name = "rules_go",
repo_name = "io_bazel_rules_go",
version = "0.34.0",
version = "0.35.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I have gotten to this yet, but how should we deal with the dependencies declared in MODULE.bazel? I haven't included updating them in the release flow yet. It's also not as important since MVS ensures that users can easily get newer version themselves if needed, and compatibility is tested with the WORKSPACE setup.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. We should include that in the releaser tool. Maybe we should use the versions resolved by MVS as the source of truth, instead of unconditionally upgrading everything to the latest.

compatibility_level = 0,
toolchains_to_register = [
"@go_default_sdk//:all",
Expand Down
2 changes: 1 addition & 1 deletion go/def.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ TOOLS_NOGO = [

# Current version or next version to be tagged. Gazelle and other tools may
# check this to determine compatibility.
RULES_GO_VERSION = "0.34.0"
RULES_GO_VERSION = "0.35.0"

declare_toolchains = _declare_toolchains
go_context = _go_context
Expand Down
84 changes: 42 additions & 42 deletions go/private/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ def go_rules_dependencies(force = False):
wrapper(
http_archive,
name = "bazel_skylib",
# 1.2.1, latest as of 2022-07-19
# 1.3.0, latest as of 2022-09-10
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.2.1/bazel-skylib-1.2.1.tar.gz",
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.2.1/bazel-skylib-1.2.1.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.3.0/bazel-skylib-1.3.0.tar.gz",
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.3.0/bazel-skylib-1.3.0.tar.gz",
],
sha256 = "f7be3474d42aae265405a592bb7da8e171919d74c16f082a5457840f06054728",
sha256 = "74d544d96f4a5bb630d465ca8bbcfe231e3594e5aae57e1edbf17a6eb3ca2506",
strip_prefix = "",
)

Expand All @@ -64,13 +64,13 @@ def go_rules_dependencies(force = False):
wrapper(
http_archive,
name = "org_golang_x_tools",
# v0.1.11, latest as of 2022-07-19
# v0.1.12, latest as of 2022-09-10
urls = [
"https://mirror.bazel.build/github.com/golang/tools/archive/refs/tags/v0.1.11.zip",
"https://github.com/golang/tools/archive/refs/tags/v0.1.11.zip",
"https://mirror.bazel.build/github.com/golang/tools/archive/refs/tags/v0.1.12.zip",
"https://github.com/golang/tools/archive/refs/tags/v0.1.12.zip",
],
sha256 = "d31521bddf3380e4ae2ae1ce6dcfca301bce6072527a07d612e13902c93916ef",
strip_prefix = "tools-0.1.11",
sha256 = "4e3d94e7bf8dde5dad681c5ddddda6e634f8c8c500683fdf3d2f77a9c086702d",
strip_prefix = "tools-0.1.12",
patches = [
# deletegopls removes the gopls subdirectory. It contains a nested
# module with additional dependencies. It's not needed by rules_go.
Expand All @@ -86,13 +86,13 @@ def go_rules_dependencies(force = False):
wrapper(
http_archive,
name = "org_golang_x_sys",
# master, as of 2022-07-19
# master, as of 2022-09-10
urls = [
"https://mirror.bazel.build/github.com/golang/sys/archive/c0bba94af5f85fbad9f6dc2e04ed5b8fac9696cf.zip",
"https://github.com/golang/sys/archive/c0bba94af5f85fbad9f6dc2e04ed5b8fac9696cf.zip",
"https://mirror.bazel.build/github.com/golang/sys/archive/aba9fc2a8ff2c9439446386f616b860442f0cf9a.zip",
"https://github.com/golang/sys/archive/aba9fc2a8ff2c9439446386f616b860442f0cf9a.zip",
],
sha256 = "5ea378ea5cfc02089a4d6a2f405ce60b742f7a8e72b121ecd3582ab041c78f62",
strip_prefix = "sys-c0bba94af5f85fbad9f6dc2e04ed5b8fac9696cf",
sha256 = "ed02417470528e20fca4c422043984e565c4d8acaa0cb946408125f676acb1ea",
strip_prefix = "sys-aba9fc2a8ff2c9439446386f616b860442f0cf9a",
patches = [
# releaser:patch-cmd gazelle -repo_root . -go_prefix golang.org/x/sys -go_naming_convention import_alias
Label("//third_party:org_golang_x_sys-gazelle.patch"),
Expand All @@ -105,13 +105,13 @@ def go_rules_dependencies(force = False):
wrapper(
http_archive,
name = "org_golang_x_xerrors",
# master, as of 2022-07-19
# master, as of 2022-09-10
urls = [
"https://mirror.bazel.build/github.com/golang/xerrors/archive/65e65417b02f28de84b55f16b46a1e789149973a.zip",
"https://github.com/golang/xerrors/archive/65e65417b02f28de84b55f16b46a1e789149973a.zip",
"https://mirror.bazel.build/github.com/golang/xerrors/archive/04be3eba64a22a838cdb17b8dca15a52871c08b4.zip",
"https://github.com/golang/xerrors/archive/04be3eba64a22a838cdb17b8dca15a52871c08b4.zip",
],
sha256 = "85290a166d6cb22eef650634c3674663cd0d35b419b23372eba9aba6bde4878d",
strip_prefix = "xerrors-65e65417b02f28de84b55f16b46a1e789149973a",
sha256 = "ffad2b06ef2e09d040da2ff08077865e99ab95d4d0451737fc8e33706bb01634",
strip_prefix = "xerrors-04be3eba64a22a838cdb17b8dca15a52871c08b4",
patches = [
# releaser:patch-cmd gazelle -repo_root . -go_prefix golang.org/x/xerrors -go_naming_convention import_alias
Label("//third_party:org_golang_x_xerrors-gazelle.patch"),
Expand Down Expand Up @@ -140,13 +140,13 @@ def go_rules_dependencies(force = False):
wrapper(
http_archive,
name = "org_golang_google_protobuf",
sha256 = "dc4339bd2011a230d81d5ec445361efeb78366f1d30a7757e8fbea3e7221080e",
# v1.28.0, latest as of 2022-07-19
sha256 = "cbaac40c1faf6a3647316d46ec9c614e99aa92c539a78b7c1e4dec3ff5f73694",
# v1.28.1, latest as of 2022-09-10
urls = [
"https://mirror.bazel.build/github.com/protocolbuffers/protobuf-go/archive/refs/tags/v1.28.0.zip",
"https://github.com/protocolbuffers/protobuf-go/archive/refs/tags/v1.28.0.zip",
"https://mirror.bazel.build/github.com/protocolbuffers/protobuf-go/archive/refs/tags/v1.28.1.zip",
"https://github.com/protocolbuffers/protobuf-go/archive/refs/tags/v1.28.1.zip",
],
strip_prefix = "protobuf-go-1.28.0",
strip_prefix = "protobuf-go-1.28.1",
patches = [
# releaser:patch-cmd gazelle -repo_root . -go_prefix google.golang.org/protobuf -go_naming_convention import_alias -proto disable_global
Label("//third_party:org_golang_google_protobuf-gazelle.patch"),
Expand All @@ -163,7 +163,7 @@ def go_rules_dependencies(force = False):
wrapper(
http_archive,
name = "com_github_golang_protobuf",
# v1.5.2, latest as of 2022-07-19
# v1.5.2, latest as of 2022-09-10
urls = [
"https://mirror.bazel.build/github.com/golang/protobuf/archive/refs/tags/v1.5.2.zip",
"https://github.com/golang/protobuf/archive/refs/tags/v1.5.2.zip",
Expand All @@ -183,7 +183,7 @@ def go_rules_dependencies(force = False):
wrapper(
http_archive,
name = "com_github_mwitkow_go_proto_validators",
# v0.3.2, latest as of 2022-07-19
# v0.3.2, latest as of 2022-09-10
urls = [
"https://mirror.bazel.build/github.com/mwitkow/go-proto-validators/archive/refs/tags/v0.3.2.zip",
"https://github.com/mwitkow/go-proto-validators/archive/refs/tags/v0.3.2.zip",
Expand All @@ -197,7 +197,7 @@ def go_rules_dependencies(force = False):
wrapper(
http_archive,
name = "com_github_gogo_protobuf",
# v1.3.2, latest as of 2022-07-19
# v1.3.2, latest as of 2022-09-10
urls = [
"https://mirror.bazel.build/github.com/gogo/protobuf/archive/refs/tags/v1.3.2.zip",
"https://github.com/gogo/protobuf/archive/refs/tags/v1.3.2.zip",
Expand All @@ -224,13 +224,13 @@ def go_rules_dependencies(force = False):
wrapper(
http_archive,
name = "org_golang_google_genproto",
# main, as of 2022-07-19
# main, as of 2022-09-10
urls = [
"https://mirror.bazel.build/github.com/googleapis/go-genproto/archive/073382fd740c33f92de4ffff0e52bfc802774231.zip",
"https://github.com/googleapis/go-genproto/archive/073382fd740c33f92de4ffff0e52bfc802774231.zip",
"https://mirror.bazel.build/github.com/googleapis/go-genproto/archive/69f6226f97e558dbaa68715071622af0d86b3a17.zip",
"https://github.com/googleapis/go-genproto/archive/69f6226f97e558dbaa68715071622af0d86b3a17.zip",
],
sha256 = "07abd3383bedc19cd8e8931f99b3b6c312dc383de795c079e0ec6c63fa32ff39",
strip_prefix = "go-genproto-073382fd740c33f92de4ffff0e52bfc802774231",
sha256 = "0d47b1ae576fffd1280538ba0b2bca5d08d6dc8df9b2a41e0ce096e37d73e2c9",
strip_prefix = "go-genproto-69f6226f97e558dbaa68715071622af0d86b3a17",
patches = [
# releaser:patch-cmd gazelle -repo_root . -go_prefix google.golang.org/genproto -go_naming_convention import_alias -proto disable_global
Label("//third_party:org_golang_google_genproto-gazelle.patch"),
Expand All @@ -247,13 +247,13 @@ def go_rules_dependencies(force = False):
wrapper(
http_archive,
name = "go_googleapis",
# master, as of 2022-07-19
# master, as of 2022-09-10
urls = [
"https://mirror.bazel.build/github.com/googleapis/googleapis/archive/53377c165584e84c410a0905d9effb3fe5df2806.zip",
"https://github.com/googleapis/googleapis/archive/53377c165584e84c410a0905d9effb3fe5df2806.zip",
"https://mirror.bazel.build/github.com/googleapis/googleapis/archive/8167badf3ce86086c69db2942a8995bb2de56c51.zip",
"https://github.com/googleapis/googleapis/archive/8167badf3ce86086c69db2942a8995bb2de56c51.zip",
],
sha256 = "73831cbb41f2750f3181d126bbabcd3e58b5188e131ecbc309793fa54d5439c9",
strip_prefix = "googleapis-53377c165584e84c410a0905d9effb3fe5df2806",
sha256 = "b97d75f1c937ed2235c501fafc475f51a3280d26f9410831686fdfd1b4f612f9",
strip_prefix = "googleapis-8167badf3ce86086c69db2942a8995bb2de56c51",
patches = [
# releaser:patch-cmd find . -name BUILD.bazel -delete
Label("//third_party:go_googleapis-deletebuild.patch"),
Expand All @@ -269,18 +269,18 @@ def go_rules_dependencies(force = False):
_maybe(
http_archive,
name = "com_github_golang_mock",
# v1.6.0, latest as of 2022-07-19
# v1.7.0-rc.1, latest as of 2022-09-10
urls = [
"https://mirror.bazel.build/github.com/golang/mock/archive/refs/tags/v1.6.0.zip",
"https://github.com/golang/mock/archive/refs/tags/v1.6.0.zip",
"https://mirror.bazel.build/github.com/golang/mock/archive/refs/tags/v1.7.0-rc.1.zip",
"https://github.com/golang/mock/archive/refs/tags/v1.7.0-rc.1.zip",
],
patches = [
# releaser:patch-cmd gazelle -repo_root . -go_prefix github.com/golang/mock -go_naming_convention import_alias
Label("//third_party:com_github_golang_mock-gazelle.patch"),
],
patch_args = ["-p1"],
sha256 = "604d9ab25b07d60c1b8ba6d3ea2e66873138edeed2e561c5358de804ea421a0e",
strip_prefix = "mock-1.6.0",
sha256 = "5359c78b0c1649cf7beb3b48ff8b1d1aaf0243b22ea4789aba94805280075d8e",
strip_prefix = "mock-1.7.0-rc.1",
)

# This may be overridden by go_register_toolchains, but it's not mandatory
Expand Down
77 changes: 70 additions & 7 deletions third_party/com_github_golang_mock-gazelle.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
diff -urN a/gomock/BUILD.bazel b/gomock/BUILD.bazel
--- a/gomock/BUILD.bazel 1969-12-31 16:00:00.000000000 -0800
+++ b/gomock/BUILD.bazel 2000-01-01 00:00:00.000000000 -0000
@@ -0,0 +1,35 @@
@@ -0,0 +1,34 @@
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+
+go_library(
Expand All @@ -10,6 +10,7 @@ diff -urN a/gomock/BUILD.bazel b/gomock/BUILD.bazel
+ "call.go",
+ "callset.go",
+ "controller.go",
+ "doc.go",
+ "matchers.go",
+ ],
+ importpath = "github.com/golang/mock/gomock",
Expand All @@ -27,8 +28,6 @@ diff -urN a/gomock/BUILD.bazel b/gomock/BUILD.bazel
+ srcs = [
+ "call_test.go",
+ "callset_test.go",
+ "controller_113_test.go",
+ "controller_114_test.go",
+ "controller_test.go",
+ "example_test.go",
+ "matchers_test.go",
Expand Down Expand Up @@ -59,17 +58,18 @@ diff -urN a/gomock/internal/mock_gomock/BUILD.bazel b/gomock/internal/mock_gomoc
diff -urN a/mockgen/BUILD.bazel b/mockgen/BUILD.bazel
--- a/mockgen/BUILD.bazel 1969-12-31 16:00:00.000000000 -0800
+++ b/mockgen/BUILD.bazel 2000-01-01 00:00:00.000000000 -0000
@@ -0,0 +1,35 @@
@@ -0,0 +1,36 @@
+load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library", "go_test")
+
+go_library(
+ name = "mockgen_lib",
+ srcs = [
+ "generic_go118.go",
+ "generic_notgo118.go",
+ "mockgen.go",
+ "parse.go",
+ "reflect.go",
+ "version.1.11.go",
+ "version.1.12.go",
+ "version.go",
+ ],
+ importpath = "github.com/golang/mock/mockgen",
+ visibility = ["//visibility:private"],
Expand Down Expand Up @@ -355,17 +355,80 @@ diff -urN a/mockgen/internal/tests/generated_identifier_conflict/BUILD.bazel b/m
+ embed = [":generated_identifier_conflict"],
+ deps = ["//gomock"],
+)
diff -urN a/mockgen/internal/tests/generics/BUILD.bazel b/mockgen/internal/tests/generics/BUILD.bazel
--- a/mockgen/internal/tests/generics/BUILD.bazel 1969-12-31 16:00:00.000000000 -0800
+++ b/mockgen/internal/tests/generics/BUILD.bazel 2000-01-01 00:00:00.000000000 -0000
@@ -0,0 +1,21 @@
+load("@io_bazel_rules_go//go:def.bzl", "go_library")
+
+go_library(
+ name = "generics",
+ srcs = [
+ "external.go",
+ "generics.go",
+ ],
+ importpath = "github.com/golang/mock/mockgen/internal/tests/generics",
+ visibility = ["//mockgen:__subpackages__"],
+ deps = [
+ "//mockgen/internal/tests/generics/other",
+ "@org_golang_x_exp//constraints:go_default_library",
+ ],
+)
+
+alias(
+ name = "go_default_library",
+ actual = ":generics",
+ visibility = ["//mockgen:__subpackages__"],
+)
diff -urN a/mockgen/internal/tests/generics/other/BUILD.bazel b/mockgen/internal/tests/generics/other/BUILD.bazel
--- a/mockgen/internal/tests/generics/other/BUILD.bazel 1969-12-31 16:00:00.000000000 -0800
+++ b/mockgen/internal/tests/generics/other/BUILD.bazel 2000-01-01 00:00:00.000000000 -0000
@@ -0,0 +1,14 @@
+load("@io_bazel_rules_go//go:def.bzl", "go_library")
+
+go_library(
+ name = "other",
+ srcs = ["other.go"],
+ importpath = "github.com/golang/mock/mockgen/internal/tests/generics/other",
+ visibility = ["//mockgen:__subpackages__"],
+)
+
+alias(
+ name = "go_default_library",
+ actual = ":other",
+ visibility = ["//mockgen:__subpackages__"],
+)
diff -urN a/mockgen/internal/tests/generics/source/BUILD.bazel b/mockgen/internal/tests/generics/source/BUILD.bazel
--- a/mockgen/internal/tests/generics/source/BUILD.bazel 1969-12-31 16:00:00.000000000 -0800
+++ b/mockgen/internal/tests/generics/source/BUILD.bazel 2000-01-01 00:00:00.000000000 -0000
@@ -0,0 +1,15 @@
+load("@io_bazel_rules_go//go:def.bzl", "go_test")
+
+go_test(
+ name = "source_test",
+ srcs = [
+ "mock_external_test.go",
+ "mock_generics_test.go",
+ ],
+ deps = [
+ "//gomock",
+ "//mockgen/internal/tests/generics",
+ "//mockgen/internal/tests/generics/other",
+ "@org_golang_x_exp//constraints:go_default_library",
+ ],
+)
diff -urN a/mockgen/internal/tests/import_embedded_interface/BUILD.bazel b/mockgen/internal/tests/import_embedded_interface/BUILD.bazel
--- a/mockgen/internal/tests/import_embedded_interface/BUILD.bazel 1969-12-31 16:00:00.000000000 -0800
+++ b/mockgen/internal/tests/import_embedded_interface/BUILD.bazel 2000-01-01 00:00:00.000000000 -0000
@@ -0,0 +1,35 @@
@@ -0,0 +1,36 @@
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+
+go_library(
+ name = "import_embedded_interface",
+ srcs = [
+ "bugreport.go",
+ "bugreport_mock.go",
+ "foo.go",
+ "net.go",
+ "net_mock.go",
+ ],
Expand Down
Loading