Skip to content

Commit

Permalink
Fix protobuf dependency. (#122)
Browse files Browse the repository at this point in the history
While there, update protobuf to v3.17.3.

Signed-off-by: Piotr Sikora <[email protected]>
  • Loading branch information
PiotrSikora authored Jun 24, 2021
1 parent 9af5ac0 commit fd0be84
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 29 deletions.
6 changes: 5 additions & 1 deletion BUILD
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")

licenses(["notice"]) # Apache 2

package(default_visibility = ["//visibility:public"])
Expand All @@ -12,6 +15,7 @@ cc_library(
],
deps = [
":common_lib",
"@com_google_protobuf//:protobuf_lite",
],
)

Expand Down Expand Up @@ -63,7 +67,7 @@ cc_library(
deps = [
":proxy_wasm_intrinsics",
":proxy_wasm_intrinsics_lite_cc_proto",
"@com_google_protobuf//:protobuf",
"@com_google_protobuf//:protobuf_lite",
],
)

Expand Down
26 changes: 3 additions & 23 deletions bazel/dep/deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -27,31 +27,11 @@ def wasm_dependencies():
sha256 = "ce7a5c76e8b425aca874cea329fd9ac44b203b777053453b6a37b4496c5ce34f"
)

# required by com_google_protobuf
_http_archive(
name = "bazel_skylib",
sha256 = "97e70364e9249702246c0e9444bccdc4b847bed1eb03c5a3ece4f83dfe6abc44",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.0.2/bazel-skylib-1.0.2.tar.gz",
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.2/bazel-skylib-1.0.2.tar.gz",
],
)

_http_archive(
name = "rules_proto",
sha256 = "9fc210a34f0f9e7cc31598d109b5d069ef44911a82f507d5a88716db171615a8",
strip_prefix = "rules_proto-f7a30f6f80006b591fa7c437fe5a951eb10bcbcf",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/f7a30f6f80006b591fa7c437fe5a951eb10bcbcf.tar.gz",
"https://github.com/bazelbuild/rules_proto/archive/f7a30f6f80006b591fa7c437fe5a951eb10bcbcf.tar.gz",
],
)

_http_archive(
name = "com_google_protobuf",
sha256 = "6dd0f6b20094910fbb7f1f7908688df01af2d4f6c5c21331b9f636048674aebf",
strip_prefix = "protobuf-3.14.0",
url = "https://github.com/protocolbuffers/protobuf/releases/download/v3.14.0/protobuf-all-3.14.0.tar.gz",
sha256 = "77ad26d3f65222fd96ccc18b055632b0bfedf295cb748b712a98ba1ac0b704b2",
strip_prefix = "protobuf-3.17.3",
url = "https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protobuf-all-3.17.3.tar.gz",
)

def _http_archive(name, **kwargs):
Expand Down
7 changes: 2 additions & 5 deletions bazel/dep/deps_extra.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

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

# Wasm deps that rely on a first stage of dependency loading in wasm_dependencies().
def wasm_dependencies_extra():
bazel_skylib_workspace()
rules_proto_dependencies()
rules_proto_toolchains()
protobuf_deps()
4 changes: 4 additions & 0 deletions proxy_wasm_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
// NOLINT(namespace-envoy)
#pragma once

#ifdef PROXY_WASM_PROTOBUF
#include "google/protobuf/message_lite.h"
#endif

#include <cstring>
#include <functional>
#include <memory>
Expand Down

0 comments on commit fd0be84

Please sign in to comment.