Skip to content

Commit e78b91d

Browse files
committed
1 parent b985760 commit e78b91d

File tree

6 files changed

+264
-0
lines changed

6 files changed

+264
-0
lines changed
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
module(
2+
name = "grpc-httpjson-transcoding",
3+
version = "0.0.0-20230607-ff41eb3",
4+
)
5+
6+
bazel_dep(
7+
name = "abseil-cpp",
8+
version = "20240116.2",
9+
repo_name = "com_google_absl",
10+
)
11+
bazel_dep(
12+
name = "googletest",
13+
version = "1.14.0.bcr.1",
14+
repo_name = "com_google_googletest",
15+
dev_dependency = True,
16+
)
17+
bazel_dep(
18+
name = "google_benchmark",
19+
version = "1.8.3",
20+
repo_name = "com_google_benchmark",
21+
dev_dependency = True,
22+
)
23+
bazel_dep(
24+
name = "nlohmann_json",
25+
version = "3.11.3",
26+
repo_name = "com_github_nlohmann_json",
27+
)
28+
bazel_dep(
29+
name = "proto-converter",
30+
version = "0.0.0-20230607-d77ff30",
31+
repo_name = "com_google_protoconverter",
32+
)
33+
bazel_dep(
34+
name = "protobuf",
35+
version = "26.0.bcr.1",
36+
repo_name = "com_google_protobuf",
37+
)
38+
bazel_dep(
39+
name = "rules_cc",
40+
version = "0.0.9",
41+
)
42+
bazel_dep(
43+
name = "rules_fuzzing",
44+
version = "0.5.2",
45+
dev_dependency = True,
46+
)
47+
bazel_dep(
48+
name = "rules_proto",
49+
version = "5.3.0-21.7",
50+
)
51+
bazel_dep(
52+
name = "zlib",
53+
version = "1.2.13",
54+
)
55+
56+
# -- bazel_dep definitions -- #
57+
58+
non_module_deps = use_extension("//:extensions.bzl", "non_module_deps")
59+
use_repo(non_module_deps, "com_google_googleapis")
60+
61+
googleapis_ext = use_extension("//:googleapis_ext.bzl", "googleapis_ext")
62+
use_repo(googleapis_ext, "com_google_googleapis_imports")
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
diff --git a/WORKSPACE b/WORKSPACE
2+
index 692ab12..c0d7f34 100644
3+
--- a/WORKSPACE
4+
+++ b/WORKSPACE
5+
@@ -15,6 +15,11 @@
6+
################################################################################
7+
#
8+
9+
+# See
10+
+# https://github.com/bazelbuild/rules_fuzzing/blob/master/README.md#configuring-the-workspace.
11+
+# The fuzzing rules must be first because if they are not, bazel will
12+
+# pull in incompatible versions of absl and rules_python.
13+
+load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
14+
load(
15+
"//:repositories.bzl",
16+
"absl_repositories",
17+
@@ -27,12 +32,6 @@ load(
18+
"protoconverter_repositories",
19+
)
20+
21+
-# See
22+
-# https://github.com/bazelbuild/rules_fuzzing/blob/master/README.md#configuring-the-workspace.
23+
-# The fuzzing rules must be first because if they are not, bazel will
24+
-# pull in incompatible versions of absl and rules_python.
25+
-load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
26+
-
27+
http_archive(
28+
name = "rules_fuzzing",
29+
sha256 = "d9002dd3cd6437017f08593124fdd1b13b3473c7b929ceb0e60d317cb9346118",
30+
diff --git a/extensions.bzl b/extensions.bzl
31+
new file mode 100644
32+
index 0000000..8d8228e
33+
--- /dev/null
34+
+++ b/extensions.bzl
35+
@@ -0,0 +1,11 @@
36+
+load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
37+
+
38+
+def _non_module_deps_impl(_ctx):
39+
+ http_archive(
40+
+ name = "com_google_googleapis",
41+
+ url = "https://github.com/googleapis/googleapis/archive/1d5522ad1056f16a6d593b8f3038d831e64daeea.tar.gz",
42+
+ sha256 = "cd13e547cffaad217c942084fd5ae0985a293d0cce3e788c20796e5e2ea54758",
43+
+ strip_prefix = "googleapis-1d5522ad1056f16a6d593b8f3038d831e64daeea",
44+
+ )
45+
+
46+
+non_module_deps = module_extension(implementation = _non_module_deps_impl)
47+
diff --git a/googleapis_ext.bzl b/googleapis_ext.bzl
48+
new file mode 100644
49+
index 0000000..d25be43
50+
--- /dev/null
51+
+++ b/googleapis_ext.bzl
52+
@@ -0,0 +1,6 @@
53+
+load("@com_google_googleapis//:repository_rules.bzl", "switched_rules_by_language")
54+
+
55+
+googleapis_ext = module_extension(implementation = lambda x: switched_rules_by_language(
56+
+ name = "com_google_googleapis_imports",
57+
+ cc = True,
58+
+))
59+
diff --git a/perf_benchmark/BUILD b/perf_benchmark/BUILD
60+
index 14c0a35..287032b 100644
61+
--- a/perf_benchmark/BUILD
62+
+++ b/perf_benchmark/BUILD
63+
@@ -15,7 +15,6 @@
64+
################################################################################
65+
#
66+
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library", "cc_test")
67+
-load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
68+
load("@io_bazel_rules_docker//cc:image.bzl", "cc_image")
69+
load("@io_bazel_rules_docker//container:container.bzl", "container_push")
70+
71+
diff --git a/repositories.bzl b/repositories.bzl
72+
index 68d98be..56ee95e 100644
73+
--- a/repositories.bzl
74+
+++ b/repositories.bzl
75+
@@ -15,7 +15,6 @@
76+
################################################################################
77+
#
78+
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
79+
-load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
80+
81+
def absl_repositories(bind = True):
82+
http_archive(
83+
diff --git a/test/BUILD b/test/BUILD
84+
index 657b77f..db96a6f 100644
85+
--- a/test/BUILD
86+
+++ b/test/BUILD
87+
@@ -14,7 +14,6 @@
88+
#
89+
################################################################################
90+
#
91+
-load("@com_google_protobuf//:protobuf.bzl", "py_proto_library")
92+
load("@rules_fuzzing//fuzzing:cc_defs.bzl", "cc_fuzz_test")
93+
94+
package(default_visibility = ["//visibility:public"])
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
--- a/MODULE.bazel
2+
+++ a/MODULE.bazel
3+
@@ -0,0 +1,62 @@
4+
+module(
5+
+ name = "grpc-httpjson-transcoding",
6+
+ version = "0.0.0-20230607-ff41eb3",
7+
+)
8+
+
9+
+bazel_dep(
10+
+ name = "abseil-cpp",
11+
+ version = "20240116.2",
12+
+ repo_name = "com_google_absl",
13+
+)
14+
+bazel_dep(
15+
+ name = "googletest",
16+
+ version = "1.14.0.bcr.1",
17+
+ repo_name = "com_google_googletest",
18+
+ dev_dependency = True,
19+
+)
20+
+bazel_dep(
21+
+ name = "google_benchmark",
22+
+ version = "1.8.3",
23+
+ repo_name = "com_google_benchmark",
24+
+ dev_dependency = True,
25+
+)
26+
+bazel_dep(
27+
+ name = "nlohmann_json",
28+
+ version = "3.11.3",
29+
+ repo_name = "com_github_nlohmann_json",
30+
+)
31+
+bazel_dep(
32+
+ name = "proto-converter",
33+
+ version = "0.0.0-20230607-d77ff30",
34+
+ repo_name = "com_google_protoconverter",
35+
+)
36+
+bazel_dep(
37+
+ name = "protobuf",
38+
+ version = "26.0.bcr.1",
39+
+ repo_name = "com_google_protobuf",
40+
+)
41+
+bazel_dep(
42+
+ name = "rules_cc",
43+
+ version = "0.0.9",
44+
+)
45+
+bazel_dep(
46+
+ name = "rules_fuzzing",
47+
+ version = "0.5.2",
48+
+ dev_dependency = True,
49+
+)
50+
+bazel_dep(
51+
+ name = "rules_proto",
52+
+ version = "5.3.0-21.7",
53+
+)
54+
+bazel_dep(
55+
+ name = "zlib",
56+
+ version = "1.2.13",
57+
+)
58+
+
59+
+# -- bazel_dep definitions -- #
60+
+
61+
+non_module_deps = use_extension("//:extensions.bzl", "non_module_deps")
62+
+use_repo(non_module_deps, "com_google_googleapis")
63+
+
64+
+googleapis_ext = use_extension("//:googleapis_ext.bzl", "googleapis_ext")
65+
+use_repo(googleapis_ext, "com_google_googleapis_imports")
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
matrix:
2+
platform:
3+
- debian10
4+
- ubuntu2004
5+
- macos
6+
- macos_arm64
7+
- windows
8+
bazel:
9+
- 7.x
10+
- 6.x
11+
tasks:
12+
verify_targets:
13+
name: Verify build targets
14+
platform: ${{ platform }}
15+
bazel: ${{ bazel }}
16+
build_targets:
17+
- '@grpc-httpjson-transcoding//src/...'
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"url": "https://github.com/grpc-ecosystem/grpc-httpjson-transcoding/archive/ff41eb3fc9209e6197595b54f7addfa244c0bdb6.tar.gz",
3+
"integrity": "sha256-3qZrPS38FQNzaX4lsTJ4d+C3SA3Cus//Hj/XqgCxJ5A=",
4+
"strip_prefix": "grpc-httpjson-transcoding-ff41eb3fc9209e6197595b54f7addfa244c0bdb6",
5+
"patches": {
6+
"grpc-httpjson-transcoding.patch": "sha256-/w+naS/JlAF4XF+6081YTXxJCICTRf5yq5Kjbn7m6OU=",
7+
"module_dot_bazel.patch": "sha256-MHRitzdYi/kjp0Q18kFLfbw/LXvvInflTSHjrbt0QDc="
8+
},
9+
"patch_strip": 1
10+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"homepage": "https://github.com/grpc-ecosystem/grpc-httpjson-transcoding",
3+
"maintainers": [
4+
{
5+
"email": "[email protected]",
6+
"name": "No Maintainer Specified"
7+
}
8+
],
9+
"repository": [
10+
"github:grpc-ecosystem/grpc-httpjson-transcoding"
11+
],
12+
"versions": [
13+
"0.0.0-20230607-ff41eb3"
14+
],
15+
"yanked_versions": {}
16+
}

0 commit comments

Comments
 (0)