Skip to content

Commit fd0be84

Browse files
authored
Fix protobuf dependency. (#122)
While there, update protobuf to v3.17.3. Signed-off-by: Piotr Sikora <[email protected]>
1 parent 9af5ac0 commit fd0be84

File tree

4 files changed

+14
-29
lines changed

4 files changed

+14
-29
lines changed

BUILD

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_proto_library")
2+
load("@rules_proto//proto:defs.bzl", "proto_library")
3+
14
licenses(["notice"]) # Apache 2
25

36
package(default_visibility = ["//visibility:public"])
@@ -12,6 +15,7 @@ cc_library(
1215
],
1316
deps = [
1417
":common_lib",
18+
"@com_google_protobuf//:protobuf_lite",
1519
],
1620
)
1721

@@ -63,7 +67,7 @@ cc_library(
6367
deps = [
6468
":proxy_wasm_intrinsics",
6569
":proxy_wasm_intrinsics_lite_cc_proto",
66-
"@com_google_protobuf//:protobuf",
70+
"@com_google_protobuf//:protobuf_lite",
6771
],
6872
)
6973

bazel/dep/deps.bzl

+3-23
Original file line numberDiff line numberDiff line change
@@ -27,31 +27,11 @@ def wasm_dependencies():
2727
sha256 = "ce7a5c76e8b425aca874cea329fd9ac44b203b777053453b6a37b4496c5ce34f"
2828
)
2929

30-
# required by com_google_protobuf
31-
_http_archive(
32-
name = "bazel_skylib",
33-
sha256 = "97e70364e9249702246c0e9444bccdc4b847bed1eb03c5a3ece4f83dfe6abc44",
34-
urls = [
35-
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.0.2/bazel-skylib-1.0.2.tar.gz",
36-
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.2/bazel-skylib-1.0.2.tar.gz",
37-
],
38-
)
39-
40-
_http_archive(
41-
name = "rules_proto",
42-
sha256 = "9fc210a34f0f9e7cc31598d109b5d069ef44911a82f507d5a88716db171615a8",
43-
strip_prefix = "rules_proto-f7a30f6f80006b591fa7c437fe5a951eb10bcbcf",
44-
urls = [
45-
"https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/f7a30f6f80006b591fa7c437fe5a951eb10bcbcf.tar.gz",
46-
"https://github.com/bazelbuild/rules_proto/archive/f7a30f6f80006b591fa7c437fe5a951eb10bcbcf.tar.gz",
47-
],
48-
)
49-
5030
_http_archive(
5131
name = "com_google_protobuf",
52-
sha256 = "6dd0f6b20094910fbb7f1f7908688df01af2d4f6c5c21331b9f636048674aebf",
53-
strip_prefix = "protobuf-3.14.0",
54-
url = "https://github.com/protocolbuffers/protobuf/releases/download/v3.14.0/protobuf-all-3.14.0.tar.gz",
32+
sha256 = "77ad26d3f65222fd96ccc18b055632b0bfedf295cb748b712a98ba1ac0b704b2",
33+
strip_prefix = "protobuf-3.17.3",
34+
url = "https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protobuf-all-3.17.3.tar.gz",
5535
)
5636

5737
def _http_archive(name, **kwargs):

bazel/dep/deps_extra.bzl

+2-5
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,8 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
16-
load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")
15+
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
1716

1817
# Wasm deps that rely on a first stage of dependency loading in wasm_dependencies().
1918
def wasm_dependencies_extra():
20-
bazel_skylib_workspace()
21-
rules_proto_dependencies()
22-
rules_proto_toolchains()
19+
protobuf_deps()

proxy_wasm_api.h

+4
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
// NOLINT(namespace-envoy)
2222
#pragma once
2323

24+
#ifdef PROXY_WASM_PROTOBUF
25+
#include "google/protobuf/message_lite.h"
26+
#endif
27+
2428
#include <cstring>
2529
#include <functional>
2630
#include <memory>

0 commit comments

Comments
 (0)