-
-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libprotobuf v5.26.0 #213
Merged
Merged
libprotobuf v5.26.0 #213
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
a3ad755
libprotobuf v5.26.0.rc3
h-vetinari 1e92bd8
rebase patches
h-vetinari 754e7c0
improve pkg-config version logic to handle rc's
h-vetinari e87e1c5
updated v26.0
regro-cf-autotick-bot df37084
backport fix for test suite failure on win
h-vetinari File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
recipe/patches/0002-set-static-lib-extension-on-windows.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
recipe/patches/0003-always-look-for-shared-abseil-builds.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
recipe/patches/0004-Export-functions-in-google-compiler-java-names.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 0 additions & 28 deletions
28
recipe/patches/0006-Fix-getting-env-variables-on-windows.patch
This file was deleted.
Oops, something went wrong.
6 changes: 3 additions & 3 deletions
6
...tadata-for-shared-abseil-on-windows.patch → ...tadata-for-shared-abseil-on-windows.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 0 additions & 24 deletions
24
recipe/patches/0007-Workaround-false-positive-warning-in-MSVC.-Fixes-htt.patch
This file was deleted.
Oops, something went wrong.
8 changes: 4 additions & 4 deletions
8
...est.RandomOrdering-due-to-flakiness.patch → ...est.RandomOrdering-due-to-flakiness.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
recipe/patches/0008-Fix-windows-only-issue-in-our-compiler-unittests.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
From a4ad52b7abda09ec071145cb7253cc1993899295 Mon Sep 17 00:00:00 2001 | ||
From: Mike Kruskal <mkruskal@google.com> | ||
Date: Tue, 19 Mar 2024 14:47:35 -0700 | ||
Subject: [PATCH 8/8] Fix windows-only issue in our compiler unittests. | ||
|
||
Closes https://github.com/protocolbuffers/protobuf/issues/16026 | ||
|
||
PiperOrigin-RevId: 617301270 | ||
--- | ||
.../protobuf/compiler/mock_code_generator.cc | 17 ++++++++++++----- | ||
1 file changed, 12 insertions(+), 5 deletions(-) | ||
|
||
diff --git a/src/google/protobuf/compiler/mock_code_generator.cc b/src/google/protobuf/compiler/mock_code_generator.cc | ||
index 665262d71..7c8912631 100644 | ||
--- a/src/google/protobuf/compiler/mock_code_generator.cc | ||
+++ b/src/google/protobuf/compiler/mock_code_generator.cc | ||
@@ -50,6 +50,7 @@ | ||
namespace google { | ||
namespace protobuf { | ||
namespace compiler { | ||
+namespace { | ||
|
||
// Returns the list of the names of files in all_files in the form of a | ||
// comma-separated string. | ||
@@ -71,14 +72,20 @@ static constexpr absl::string_view kFirstInsertionPoint = | ||
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 GetTestCase() { | ||
const 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 | ||
- c_key = ""; | ||
+ // and therefore c_key can be nullptr | ||
+ return ""; | ||
} | ||
- absl::string_view key(c_key); | ||
+ return c_key; | ||
+} | ||
+ | ||
+} // namespace | ||
+ | ||
+MockCodeGenerator::MockCodeGenerator(absl::string_view name) : name_(name) { | ||
+ absl::string_view key = GetTestCase(); | ||
if (key == "no_editions") { | ||
suppressed_features_ |= CodeGenerator::FEATURE_SUPPORTS_EDITIONS; | ||
} else if (key == "invalid_features") { | ||
@@ -214,7 +221,7 @@ bool MockCodeGenerator::Generate(const FileDescriptor* file, | ||
std::string* error) const { | ||
// Override minimum/maximum after generating the pool to simulate a plugin | ||
// that "works" but doesn't advertise support of the current edition. | ||
- absl::string_view test_case = getenv("TEST_CASE"); | ||
+ absl::string_view test_case = GetTestCase(); | ||
if (test_case == "high_minimum") { | ||
minimum_edition_ = Edition::EDITION_99997_TEST_ONLY; | ||
} else if (test_case == "low_maximum") { |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there some documentation about it somewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No idea TBH, would need some digging upstream; I just observed it while building the release candidates and put 2+2 together 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find this behavior of
pkg-config
dangerous. 👀There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty sure it's the way protobuf has set up their metadata; in any case, we're doing exact matches on the versions (according to the pkg-config metadata) in the testing here, so I'm not too worried.