blob: b44671157c44efde5cf62770798f705a55880e79 [file] [log] [blame]
diff --git a/MODULE.bazel b/MODULE.bazel
index ea70894de..37e49a5c6 100644
--- a/MODULE.bazel
+++ b/MODULE.bazel
@@ -24,3 +24,8 @@ bazel_dep(name = "zlib", version = "1.2.11")
# TODO: remove after toolchain types are moved to protobuf
bazel_dep(name = "rules_proto", version = "4.0.0")
+
+# Do not take the effort to convert utf8_range to Bzlmod as this has been moved to protobuf/third_party
+# See https://github.com/protocolbuffers/utf8_range/commit/1d1ea7e3fedf482d4a12b473c1ed25fe0f371a45
+non_module_deps = use_extension("//:non_module_deps.bzl", "non_module_deps")
+use_repo(non_module_deps, "utf8_range")
diff --git a/non_module_deps.bzl b/non_module_deps.bzl
new file mode 100644
index 000000000..0b3c57229
--- /dev/null
+++ b/non_module_deps.bzl
@@ -0,0 +1,19 @@
+load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
+
+def _github_archive(repo, commit, **kwargs):
+ repo_name = repo.split("/")[-1]
+ http_archive(
+ urls = [repo + "/archive/" + commit + ".zip"],
+ strip_prefix = repo_name + "-" + commit,
+ **kwargs
+ )
+
+def _non_module_deps_impl(ctx):
+ _github_archive(
+ name = "utf8_range",
+ repo = "https://github.com/protocolbuffers/utf8_range",
+ commit = "de0b4a8ff9b5d4c98108bdfe723291a33c52c54f",
+ sha256 = "5da960e5e5d92394c809629a03af3c7709d2d3d0ca731dacb3a9fb4bf28f7702",
+ )
+
+non_module_deps = module_extension(implementation = _non_module_deps_impl)
\ No newline at end of file