Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new version of upb #1660

Merged
merged 8 commits into from
Mar 22, 2024
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
19 changes: 19 additions & 0 deletions modules/upb/0.0.0-20230907-e7430e6/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module(
name = "upb",
version = "0.0.0-20230907-e7430e6",
compatibility_level = 1,
)

bazel_dep(name = "abseil-cpp", version = "20230802.0.bcr.1", repo_name = "com_google_absl")
bazel_dep(name = "bazel_skylib", version = "1.0.3")
bazel_dep(name = "platforms", version = "0.0.5")
bazel_dep(name = "rules_cc", version = "0.0.9")
bazel_dep(name = "protobuf", version = "23.1", repo_name = "com_google_protobuf")
bazel_dep(name = "rules_pkg", version = "0.7.0")
bazel_dep(name = "rules_proto", version = "4.0.0")
bazel_dep(name = "rules_python", version = "0.31.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")
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
--- /dev/null
+++ b/MODULE.bazel
@@ -0,0 +1,19 @@
+module(
+ name = "upb",
+ version = "0.0.0-20230907-e7430e6",
+ compatibility_level = 1,
+)
+
+bazel_dep(name = "abseil-cpp", version = "20230802.0.bcr.1", repo_name = "com_google_absl")
+bazel_dep(name = "bazel_skylib", version = "1.0.3")
+bazel_dep(name = "platforms", version = "0.0.5")
+bazel_dep(name = "rules_cc", version = "0.0.9")
+bazel_dep(name = "protobuf", version = "23.1", repo_name = "com_google_protobuf")
+bazel_dep(name = "rules_pkg", version = "0.7.0")
+bazel_dep(name = "rules_proto", version = "4.0.0")
+bazel_dep(name = "rules_python", version = "0.31.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")
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
--- /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)
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/BUILD
+++ b/BUILD
@@ -743,2 +743,8 @@ filegroup(
#
# end:google_only
+
+alias(
+ name = "textformat",
+ actual = "//upb/text:text",
+ visibility = ["//visibility:public"],
+)
15 changes: 15 additions & 0 deletions modules/upb/0.0.0-20230907-e7430e6/presubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
matrix:
platform: ["debian10", "macos", "ubuntu2004", "windows"]
bazel: ["6.x", "7.x"]
tasks:
verify_targets:
platform: ${{ platform }}
bazel: ${{ bazel }}
build_flags:
- '--cxxopt=-std=c++14'
- '--host_cxxopt=-std=c++14'
build_targets:
- '@upb//:upb'
- '@upb//:descriptor_upb_proto'
- '@upb//:textformat'
- '@upb//cmake:staleness_test_lib'
11 changes: 11 additions & 0 deletions modules/upb/0.0.0-20230907-e7430e6/source.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"integrity": "sha256-o1DZS2CWjimNFBLfUcH/fVGQ3RPtsXseB2asNpwXQAk=",
"strip_prefix": "upb-e7430e66d6e51def2a88f0b66fdab62b0d9492c1",
"url": "https://github.com/protocolbuffers/upb/archive/e7430e66d6e51def2a88f0b66fdab62b0d9492c1.tar.gz",
"patch_strip": 1,
"patches": {
"0001-Add-MODULE.bazel.patch": "sha256-AC7tn9EKtF9UprYQKdPxH/PQGLF9U0jgoSZfh/rzmuc=",
"0002-Add-utf8_range-dependency.patch": "sha256-zQDiCRqENGZ2Y5+WTjSgmkTWSaRHaU0vefc+XUxksaw=",
"0003-Add-textformat-alias.patch": "sha256-IHkHImqzDKY8zQqheZGwuluHqtkFbZgj0wfNXmvHf3w="
}
}
3 changes: 2 additions & 1 deletion modules/upb/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"0.0.0-20211020-160625a",
"0.0.0-20220602-e5f2601",
"0.0.0-20220923-a547704",
"0.0.0-20230516-61a97ef"
"0.0.0-20230516-61a97ef",
"0.0.0-20230907-e7430e6"
],
"yanked_versions": {}
}
Loading