From 6c74f2338cca718f1260b6fdacc3376e3ef1fcde Mon Sep 17 00:00:00 2001 From: JP Simard Date: Fri, 28 Jan 2022 15:19:08 -0500 Subject: [PATCH] [json] Remove com_github_nlohmann_json override & patch The patch is no longer needed as it was similarly patched upstream in https://github.com/nlohmann/json/pull/3101. That patch was then shipped in v3.10.5, which is the version used in Envoy now. Signed-off-by: JP Simard --- bazel/envoy_mobile_repositories.bzl | 12 -------- bazel/json.patch | 48 ----------------------------- 2 files changed, 60 deletions(-) delete mode 100644 bazel/json.patch diff --git a/bazel/envoy_mobile_repositories.bzl b/bazel/envoy_mobile_repositories.bzl index bc5897e029..3681f54e5b 100644 --- a/bazel/envoy_mobile_repositories.bzl +++ b/bazel/envoy_mobile_repositories.bzl @@ -69,18 +69,6 @@ def upstream_envoy_overrides(): urls = ["https://github.com/bazelbuild/rules_python/archive/6f37aa9966f53e063c41b7509a386d53a9f156c3.tar.gz"], ) - http_archive( - name = "com_github_nlohmann_json", - # 3.10.4 introduced incompatible changes with Envoy Mobile. Until Envoy Mobile updates it's - # minimum iOS version to 13+ this dependency needs to be patched. - patches = ["@envoy_mobile//bazel:json.patch"], - patch_args = ["-p1"], - sha256 = "1155fd1a83049767360e9a120c43c578145db3204d2b309eba49fbbedd0f4ed3", - strip_prefix = "json-3.10.4", - urls = ["https://github.com/nlohmann/json/archive/v3.10.4.tar.gz"], - build_file = "@envoy//bazel/external:json.BUILD", - ) - def swift_repos(): http_archive( name = "build_bazel_rules_apple", diff --git a/bazel/json.patch b/bazel/json.patch deleted file mode 100644 index e09a72875a..0000000000 --- a/bazel/json.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff --git a/include/nlohmann/detail/conversions/from_json.hpp b/include/nlohmann/detail/conversions/from_json.hpp -index 71e32aaf7..6a4575ecb 100644 ---- a/include/nlohmann/detail/conversions/from_json.hpp -+++ b/include/nlohmann/detail/conversions/from_json.hpp -@@ -448,7 +448,7 @@ void from_json(const BasicJsonType& j, std::unordered_map= 130000)) - template - void from_json(const BasicJsonType& j, std::filesystem::path& p) - { -diff --git a/include/nlohmann/detail/conversions/to_json.hpp b/include/nlohmann/detail/conversions/to_json.hpp -index 79fdb3233..6a4aa7ff3 100644 ---- a/include/nlohmann/detail/conversions/to_json.hpp -+++ b/include/nlohmann/detail/conversions/to_json.hpp -@@ -391,7 +391,7 @@ void to_json(BasicJsonType& j, const T& t) - to_json_tuple_impl(j, t, make_index_sequence::value> {}); - } - --#ifdef JSON_HAS_CPP_17 -+#if defined(JSON_HAS_CPP_17) && (defined(__APPLE__) && (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 130000)) - template - void to_json(BasicJsonType& j, const std::filesystem::path& p) - { -diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp -index 87475ab31..c999784a2 100644 ---- a/single_include/nlohmann/json.hpp -+++ b/single_include/nlohmann/json.hpp -@@ -4379,7 +4379,7 @@ void from_json(const BasicJsonType& j, std::unordered_map= 130000)) - template - void from_json(const BasicJsonType& j, std::filesystem::path& p) - { -@@ -5002,7 +5002,7 @@ void to_json(BasicJsonType& j, const T& t) - to_json_tuple_impl(j, t, make_index_sequence::value> {}); - } - --#ifdef JSON_HAS_CPP_17 -+#if defined(JSON_HAS_CPP_17) && (defined(__APPLE__) && (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 130000)) - template - void to_json(BasicJsonType& j, const std::filesystem::path& p) - {