|
| 1 | +--- a/MODULE.bazel |
| 2 | ++++ b/MODULE.bazel |
| 3 | +@@ -9,3 +9,8 @@ bazel_dep(name = "protobuf", version = "23.1", repo_name = "com_google_protobuf" |
| 4 | + bazel_dep(name = "abseil-cpp", version = "20230802.0.bcr.1", repo_name = "com_google_absl") |
| 5 | + bazel_dep(name = "rules_pkg", version = "0.7.0") |
| 6 | + bazel_dep(name = "platforms", version = "0.0.5") |
| 7 | ++ |
| 8 | ++# Do not take the effort to convert utf8_range to Bzlmod as this has been moved to protobuf/third_party |
| 9 | ++# See https://github.com/protocolbuffers/utf8_range/commit/1d1ea7e3fedf482d4a12b473c1ed25fe0f371a45 |
| 10 | ++non_module_deps = use_extension("//:non_module_deps.bzl", "non_module_deps") |
| 11 | ++use_repo(non_module_deps, "utf8_range") |
| 12 | +diff --git a/non_module_deps.bzl b/non_module_deps.bzl |
| 13 | +new file mode 100644 |
| 14 | +index 00000000..5cc13d7f |
| 15 | +--- /dev/null |
| 16 | ++++ b/non_module_deps.bzl |
| 17 | +@@ -0,0 +1,19 @@ |
| 18 | ++load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") |
| 19 | ++ |
| 20 | ++def _github_archive(repo, commit, **kwargs): |
| 21 | ++ repo_name = repo.split("/")[-1] |
| 22 | ++ http_archive( |
| 23 | ++ urls = [repo + "/archive/" + commit + ".zip"], |
| 24 | ++ strip_prefix = repo_name + "-" + commit, |
| 25 | ++ **kwargs |
| 26 | ++ ) |
| 27 | ++ |
| 28 | ++def _non_module_deps_impl(ctx): |
| 29 | ++ _github_archive( |
| 30 | ++ name = "utf8_range", |
| 31 | ++ repo = "https://github.com/protocolbuffers/utf8_range", |
| 32 | ++ commit = "de0b4a8ff9b5d4c98108bdfe723291a33c52c54f", |
| 33 | ++ sha256 = "5da960e5e5d92394c809629a03af3c7709d2d3d0ca731dacb3a9fb4bf28f7702", |
| 34 | ++ ) |
| 35 | ++ |
| 36 | ++non_module_deps = module_extension(implementation = _non_module_deps_impl) |
0 commit comments