なつき
6609bea792
Fix jruby encoding in new thread ( #12919 )
...
In jruby `runtime.evalScriptlet('Encoding::UTF_8')` can be broken under a newly created thread, which can cause protobuf encoding to fail. For example: https://github.com/ntkme/sass-embedded-host-ruby/actions/runs/5108602231/jobs/9182569583#step:5:544
It real issue seems to be in jruby itself. A bug report with minimal reproduction has been filed at https://github.com/jruby/jruby/issues/7820
This PR fixes the problem by effectively replacing `runtime.evalScriptlet('Encoding::UTF_8')` with `runtime.getEncodingService().convertEncodingToRubyEncoding(org.jcodings.specific.UTF8Encoding.INSTANCE)`, which works on all threads.
Closes #12919
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/12919 from ntkme:fix-jruby-encoding 345680ea91
PiperOrigin-RevId: 536498846
2 years ago
Protobuf Team Bot
79f0575735
Auto-generate files after cl/536496189
2 years ago
Protobuf Team Bot
4b3615c332
Move more methods into MapFieldBase using the type-erased iteration functions.
...
This further reduces code duplication and binary size.
PiperOrigin-RevId: 536496189
2 years ago
Protobuf Team Bot
472e8b40f6
Auto-generate files after cl/536487251
2 years ago
Protobuf Team Bot
252aaba0e0
Internal change
...
PiperOrigin-RevId: 536487251
2 years ago
Protobuf Team Bot
81b432f645
Auto-generate files after cl/536439101
2 years ago
Jie Luo
862a2281ce
Remove AddHelpersToExtenions() in generated code
...
PiperOrigin-RevId: 536439101
2 years ago
Protobuf Team Bot
509ff5815c
Auto-generate files after cl/536414905
2 years ago
Mike Kruskal
dfa5abb1be
Internal changes
...
PiperOrigin-RevId: 536414905
2 years ago
Protobuf Team Bot
41502316e2
Auto-generate files after cl/536393161
2 years ago
Protobuf Team Bot
d768bdff25
Internal change
...
PiperOrigin-RevId: 536393161
2 years ago
Protobuf Team Bot
b75eb9c5c9
Auto-generate files after cl/536333112
2 years ago
Protobuf Team Bot
ca1a98018e
Internal change
...
PiperOrigin-RevId: 536333112
2 years ago
Protobuf Team Bot
76243520fa
Auto-generate files after cl/536314287
2 years ago
Protobuf Team Bot
48b67e2ad6
Internal change
...
PiperOrigin-RevId: 536314287
2 years ago
Protobuf Team Bot
680849ca8c
Auto-generate files after cl/535782238
2 years ago
Protobuf Team Bot
134e027231
Internal change.
...
PiperOrigin-RevId: 535782481
2 years ago
Sandy Zhang
ad07adbd65
Update Java lite MessageInfo encoding to store ProtoSyntax enum instead of boolean and set/check bit for enum closeness.
...
This updates kMapWithProto2EnumValue -> kLegacyEnumIsClosedBit s.t. this bit now indicates closedness for enum fields as well, not just maps with enum values.
PiperOrigin-RevId: 535782238
2 years ago
Protobuf Team Bot
13c06cbb54
Auto-generate files after cl/535741022
2 years ago
Mike Kruskal
504788eba1
Internal changes
...
PiperOrigin-RevId: 535741022
2 years ago
Mike Kruskal
d15e15df55
Merge pull request #12918 from coryan/chore-deps-update-utf8-range
...
chore(deps): update utf8_range
2 years ago
Protobuf Team Bot
3185c2fa0b
Auto-generate files after cl/535728592
2 years ago
Carlos O'Ryan
f2d99477a0
Merge commit '4b414d60eeaa00f6fbbbdb2f937b26601e903ee9' into chore-deps-update-utf8-range
2 years ago
Carlos O'Ryan
4b414d60ee
Squashed 'third_party/utf8_range/' changes from 72c943dea..d863bc33e
...
d863bc33e cleanup: avoid "unused function" errors in OSS land
f4948c4f2 internal change
cd1507d14 Fix typo in pkg-config file to properly link the utf8_range libraries
3f179d134 Add pkg-config file declaring Abseil dependency of utf8_range
git-subtree-dir: third_party/utf8_range
git-subtree-split: d863bc33e15cba6d873c878dcca9e6fe52b2f8cb
2 years ago
Adam Cozzette
edcfedfc92
Update retention logic to remove empty options messages
...
This way the retention stripping will not leave empty options messages lying
around.
PiperOrigin-RevId: 535728592
2 years ago
Protobuf Team Bot
044162e910
Auto-generate files after cl/535722419
2 years ago
Protobuf Team Bot
b93d55de61
Internal change
...
PiperOrigin-RevId: 535722419
2 years ago
Protobuf Team Bot
03977061d9
Auto-generate files after cl/535650747
2 years ago
Protobuf Team Bot
89500f8e43
Internal change
...
PiperOrigin-RevId: 535650747
2 years ago
Protobuf Team Bot
e02f781415
Auto-generate files after PR #12903
2 years ago
Carlos O'Ryan
9c479e8599
feat: workaround for `DOMAIN` macro ( #12903 )
...
This is a macro on some (older) versions of GCC, and macOS, and Windows. Sigh. I moved the `#undef` block to a common section. I also took the opportunity to add a regression test for all these macros that need to be `#undef`'d.
Part of the work for googleapis/google-cloud-cpp#8125
Closes #12903
PiperOrigin-RevId: 535649278
2 years ago
Protobuf Team Bot
8ef9357f3a
Auto-generate files after cl/535637656
2 years ago
Protobuf Team Bot
624e27f49c
Internal change
...
PiperOrigin-RevId: 535637656
2 years ago
Protobuf Team Bot
df0790b778
Auto-generate files after cl/535582084
2 years ago
Protobuf Team Bot
f51583fa4d
Internal change
...
PiperOrigin-RevId: 535582084
2 years ago
Protobuf Team Bot
10abec9c69
Auto-generate files after PR #12901
2 years ago
Carlos O'Ryan
13a1a3effe
feat(cmake): require at least C++14 ( #12901 )
...
This will require C++14 (or higher) for the `libproto*` targets **and** anything that links them. If multiple dependencies have different C++ requirements, CMake will use the maximum version. It does not work with pkg-config, and does not work if the downstream dependency forcibly downgrades the compiler to C++11 (or lower). But prevents many problems. Note that if Abseil was compiled with C++17 it will require C++17 and that will propagate through Protobuf.
Closes #12901
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/12901 from coryan:feat-cmake-use-target-compile-features 95084ac691
PiperOrigin-RevId: 535579816
2 years ago
Protobuf Team Bot
59c8e0cc5d
Auto-generate files after cl/535488676
2 years ago
Protobuf Team Bot
67c69b9a5c
Internal change
...
PiperOrigin-RevId: 535488676
2 years ago
Protobuf Team Bot
8d78b4b7b0
Auto-generate files after cl/535404403
2 years ago
Protobuf Team Bot
2477993637
Internal change
...
PiperOrigin-RevId: 535404403
2 years ago
Protobuf Team Bot
216aa5cdbc
Auto-generate files after cl/535397851
2 years ago
Protobuf Team Bot
066a9d0bae
internal change
...
PiperOrigin-RevId: 535397851
2 years ago
Protobuf Team Bot
2ac26b9e06
Auto-generate files after cl/535371638
2 years ago
Protobuf Team Bot
b7a2984c4e
Internal change
...
PiperOrigin-RevId: 535371638
2 years ago
Protobuf Team Bot
e255630c02
Auto-generate files after cl/535359088
2 years ago
Joshua Haberman
b2a520f693
Respect NDEBUG for asserts even though Ruby 3+ pollutes it.
...
Prior to this CL, asserts have no effect for Ruby 3+, because Ruby unconditionally defines `NDEBUG`: https://bugs.ruby-lang.org/issues/18777
We work around this by doing `#undef NDEBUG` right after including Ruby, if `NDEBUG` was not previously defined.
PiperOrigin-RevId: 535359088
2 years ago
Protobuf Team Bot
5101674194
Auto-generate files after cl/535351694
2 years ago
Mike Kruskal
eb5e9e01d9
Strengthen assertions on reflection methods.
...
This will ensure that the message is using the correct reflection object, rather than just the correct descriptor. This distinction only matters with dynamic messages, where multiple reflection objects can exist for the same descriptor.
Failing to pass this check can lead to UB and crashes.
PiperOrigin-RevId: 535351694
2 years ago
Protobuf Team Bot
65d987f802
Internal change
...
PiperOrigin-RevId: 535309339
2 years ago