Skip to content

Commit

Permalink
Merge pull request #200 from regro-cf-autotick-bot/25.1_hba5848
Browse files Browse the repository at this point in the history
libprotobuf v25.1
  • Loading branch information
h-vetinari authored Jan 21, 2024
2 parents 9624c8d + b0bf986 commit 85b0dea
Show file tree
Hide file tree
Showing 12 changed files with 107 additions and 14 deletions.
3 changes: 3 additions & 0 deletions .azure-pipelines/azure-pipelines-linux.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .azure-pipelines/azure-pipelines-osx.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .azure-pipelines/azure-pipelines-win.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/CODEOWNERS

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 23 additions & 2 deletions .gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions .scripts/build_steps.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .scripts/run_docker_build.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 10 additions & 3 deletions .scripts/run_osx_build.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 12 additions & 2 deletions .scripts/run_win_build.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# keep this without major version to let the bot pick it up
{% set version = "24.4" %}
{% set version = "25.1" %}
# protobuf doesn't add the major version in the tag, it's defined per language in
# https://github.com/protocolbuffers/protobuf/blob/main/version.json
{% set major = "4" %}
Expand All @@ -12,14 +12,15 @@ package:

source:
- url: https://github.com/protocolbuffers/protobuf/archive/refs/tags/v{{ version.replace(".rc", "-rc") }}.tar.gz
sha256: 616bb3536ac1fff3fb1a141450fa28b875e985712170ea7f1bfe5e5fc41e2cd8
sha256: 9bd87b8280ef720d3240514f884e56a712f2218f0d693b48050c836028940a42
patches:
- patches/0001-use-consistent-cmake-location.patch
- patches/0002-set-static-lib-extension-on-windows.patch
- patches/0003-always-look-for-shared-abseil-builds.patch
# grpc_cpp_java_plugin links against otherwise internal symbols
- patches/0004-Export-functions-in-google-compiler-java-names.patch
- patches/0005-do-not-install-vendored-gmock.patch
- patches/0006-Fix-getting-env-variables-on-windows.patch

build:
number: 0
Expand Down
31 changes: 31 additions & 0 deletions recipe/patches/0006-Fix-getting-env-variables-on-windows.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
From c54edc4ac169b2196d91ff6f6728cbefe5ae61c2 Mon Sep 17 00:00:00 2001
From: Isuru Fernando <isuruf@gmail.com>
Date: Fri, 19 Jan 2024 19:14:50 -0600
Subject: [PATCH] Fix getting env variables on windows

---
src/google/protobuf/compiler/mock_code_generator.cc | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/google/protobuf/compiler/mock_code_generator.cc b/src/google/protobuf/compiler/mock_code_generator.cc
index d7057a1e6..8b6742687 100644
--- a/src/google/protobuf/compiler/mock_code_generator.cc
+++ b/src/google/protobuf/compiler/mock_code_generator.cc
@@ -73,7 +73,13 @@ static constexpr absl::string_view kSecondInsertionPoint =
" # @@protoc_insertion_point(second_mock_insertion_point) is here\n";

MockCodeGenerator::MockCodeGenerator(absl::string_view name) : name_(name) {
- absl::string_view key = getenv("TEST_CASE");
+ char* c_key = getenv("TEST_CASE");
+ if (c_key == NULL) {
+ // In Windows, setting 'TEST_CASE=' is equivalent to unsetting
+ // and therefore c_key can be NULL
+ return;
+ }
+ absl::string_view key(c_key);
if (key == "no_editions") {
suppressed_features_ |= CodeGenerator::FEATURE_SUPPORTS_EDITIONS;
} else if (key == "invalid_features") {
--
2.42.0

0 comments on commit 85b0dea

Please sign in to comment.