Skip to content

Commit 3119d2a

Browse files
committed
Fix hessian2_codec Envoy dependency builds in Dalec
It's not immediately clear why in Dalec hessian2_codec does not build successfully, while using Envoy CI Docker image it builds just fine. However, it's pretty clear to me that hessian2 repo contains an issue with Bazel build rules and fixing it resolves the Dalec build problem. I've sent a patch to the upstream hessian2_codec repository (see alibaba/hessian2-codec#37). The patch, if accepted will fix the problem for future versions of Envoy, but in 1.32 we are stuck with this issue. Signed-off-by: Mikhail Krinkin <krinkin.m.u@gmail.com>
1 parent ad161f1 commit 3119d2a

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

bazel/foreign_cc/hessian2.patch

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
diff --git a/hessian2/basic_codec/BUILD b/hessian2/basic_codec/BUILD
2+
index 65587d7..4ffd22c 100644
3+
--- a/hessian2/basic_codec/BUILD
4+
+++ b/hessian2/basic_codec/BUILD
5+
@@ -203,8 +203,6 @@ cc_library(
6+
srcs = [
7+
"class_instance_codec.cc",
8+
"class_instance_codec.hpp",
9+
- "def_ref_codec.cc",
10+
- "def_ref_codec.hpp",
11+
"list_codec.cc",
12+
"list_codec.hpp",
13+
"map_codec.cc",
14+
@@ -217,6 +215,7 @@ cc_library(
15+
":bool_codec_lib",
16+
":byte_codec_lib",
17+
":date_codec_lib",
18+
+ ":def_ref_codec_lib",
19+
":number_codec_lib",
20+
":ref_object_codec_lib",
21+
":string_codec_lib",

bazel/repositories.bzl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,11 @@ def _com_github_nlohmann_json():
577577
)
578578

579579
def _com_github_alibaba_hessian2_codec():
580-
external_http_archive("com_github_alibaba_hessian2_codec")
580+
external_http_archive(
581+
name = "com_github_alibaba_hessian2_codec",
582+
patches = ["@envoy//bazel/foreign_cc:hessian2.patch"],
583+
patch_args = ["-p1"],
584+
)
581585

582586
def _com_github_ncopa_suexec():
583587
external_http_archive(

0 commit comments

Comments
 (0)