Sandy Zhang
116dd9cd24
Update to rc2
10 months ago
Protobuf Team Bot
56f557a0f5
Auto-generate files after cl/600487923
10 months ago
Sandy Zhang
65c65c2d04
Breaking Change: Use Editions features in Java full runtimes.
...
This change breaks compatibility with old generated code from previous major versions per the Cross Version Runtime policy: https://protobuf.dev/support/cross-version-runtime-guarantee . This includes old gencode from <4.26.x, which does not resolve features.
See https://protobuf.dev/news/2023-12-05/
PiperOrigin-RevId: 600487923
10 months ago
Protobuf Team Bot
040dde7e37
Correct type_resolver_util to set syntax=proto3 instead of syntax=proto2 on proto3 files.
...
PiperOrigin-RevId: 600473754
10 months ago
Isuru Fernando
71b0b4e0a9
Fix getting env variables on windows ( #15518 )
...
Fixes https://github.com/protocolbuffers/protobuf/issues/15436
Closes #15518
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/15518 from isuruf:win_env 1b1f2cc31c
PiperOrigin-RevId: 600469988
10 months ago
Marcel Hlopko
0f4cf16815
Depend directly on cc_proto_aspect in rust_cc_proto_library
...
We had to wait for cc_proto_aspect to be exposed in Bazel. Now it is, so we can
simplify our build rules
PiperOrigin-RevId: 600362773
10 months ago
Protobuf Team Bot
c0d08bdcad
Breaking Change: Stop generating the "newInstance" method. This is not used anymore.
...
PiperOrigin-RevId: 600123108
10 months ago
Harald Kjær Nielsen
1eff9d7451
Proper fix utf8 command line arguments ( #14253 )
...
https://github.com/protocolbuffers/protobuf/pull/14197
Tried to fix utf-8 issue, but it didnt handle multibyte chars.
Only way I found that works constantly is using `CommandLineToArgvW`.
To not ripple out `wchar_t`, I convert to and from where needed
Closes #14253
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/14253 from hknielsen:proper-fix-none-ascii-issue cad753e9e6
PiperOrigin-RevId: 599990369
11 months ago
Alyssa Haroldsen
f0ccf26e63
Correct raw identifier terminology in rust_keywords
...
PiperOrigin-RevId: 599954613
11 months ago
Mike Kruskal
f6812b7d6d
Bump python version to 3.9 for gcloud 460.0.0
...
PiperOrigin-RevId: 599953322
11 months ago
Marcel Hlopko
c1d174f7d2
Stop codegenning module for .proto package
...
PiperOrigin-RevId: 599856754
11 months ago
Marcel Hlopko
39e8ca7faf
Add support for repeated strings/bytes
...
PiperOrigin-RevId: 599822292
11 months ago
Alyssa Haroldsen
457ed9b44f
Use `self` accessors for accessing maps in views
...
This was missed by a prior change
PiperOrigin-RevId: 599822201
11 months ago
Protobuf Team Bot
7d508b41df
Internal change
...
PiperOrigin-RevId: 599669392
11 months ago
Adam Cozzette
65a353fa10
Update JSON parser to reject overlong UTF-8 encodings
...
A fuzz test discovered that our JSON parser will accept "overlong" UTF-8
characters, i.e. encodings that use more bytes than necessary. We should reject
these overlong encodings, because they are not considered valid.
To fix this problem, I updated the JSON lexer to rely on utf8_range for
checking UTF-8 validity. This way, the lexer does not need to do any UTF-8
validation of its own, but just has to interpret the UTF-8 enough to know how
many bytes to read for each character.
PiperOrigin-RevId: 599657903
11 months ago
Sandy Zhang
3c8a3d27f7
Raise minimum PHP version to 8.1, due to PHP 8.0 EOL per https://cloud.google.com/php/getting-started/supported-php-versions
...
Drops tests for PHP 8.0, and adds tests for PHP 8.3. See https://www.php.net/supported-versions.php .
PiperOrigin-RevId: 599636473
11 months ago
Protobuf Team Bot
57f770f8c9
Make sure the pb_defaults section is never empty instead of using __attribute__((weak)). Not all platforms support having a never defined weak symbol.
...
This change rolls back part of the last change for weak descriptors, towards a known good state.
PiperOrigin-RevId: 599629787
11 months ago
Sandy Zhang
cbd9a98301
Don't emit redundant enum name gencode when has_reflection is false.
...
This is already emitted a few lines before in previous has_reflection_ condition and results in compiler -Wredundant-decls warnings.
Fixes #14979
PiperOrigin-RevId: 599610424
11 months ago
Éamonn McManus
fc2d9da9c0
Wrap C++ headers in `#ifdef __cplusplus`.
...
The upb libraries can also be accessed from Kotlin Native code, which
understands only C headers, not C++. By adding these `#ifdef` directives, the
C++ headers will appear to be empty in that case.
PiperOrigin-RevId: 599593286
11 months ago
Protobuf Team Bot
d98722b53c
Auto-generate files after cl/599558000
11 months ago
Protobuf Team Bot
b161e2df00
Change the way pinning and weak references are done in the Weak Descriptor
...
feature.
The existing solution does not work well in the face of shared libraries when
section merging can't be done via linker script.
The new solution has two separate modes of action:
- When sections are not merged, we directly put the default instance pointer
in the file_default_instances array.
- When sections are merged, the file_default_instances array is all `nullptr`
and we inject them at runtime via `InitWeakDefaults`. All the surviving
default instances are in this section with extra information to be able to
iterate the section.
PiperOrigin-RevId: 599558000
11 months ago
Protobuf Team Bot
adacf6d0e1
Use char indexOf rather than String, which can have a fast path implementation
...
PiperOrigin-RevId: 599529561
11 months ago
Protobuf Team Bot
979c39178b
Format CodedInputStream & Test
...
PiperOrigin-RevId: 599528929
11 months ago
Protobuf Team Bot
2c28d728da
Add missing Protobuf Java version checks for enums and missing version info when separate Java files are generated.
...
PiperOrigin-RevId: 599515908
11 months ago
Protobuf Team Bot
3d79d0374b
Auto-generate files after cl/599369761
11 months ago
Protobuf Team Bot
fedd34df47
Allocate an editions FeatureSet extension for https://github.com/bufbuild/protobuf-es
...
PiperOrigin-RevId: 599369761
11 months ago
Alyssa Haroldsen
32c17c0919
Simplify format variables in singular_string
...
PiperOrigin-RevId: 599335169
11 months ago
Alyssa Haroldsen
c1bb1981a4
Remove Deref from MapMut
...
PiperOrigin-RevId: 599329208
11 months ago
Alyssa Haroldsen
b6ea6f9192
Remove Deref from RepeatedMut
...
PiperOrigin-RevId: 599328590
11 months ago
Protobuf Team Bot
2fb2274716
Auto-generate files after cl/599323122
11 months ago
Alyssa Haroldsen
4696ac71ca
Rename 'a to 'msg in message gencode
...
PiperOrigin-RevId: 599325506
11 months ago
Alyssa Haroldsen
ab8b762941
Use `self` for all methods on views, return `'msg`
...
View is Copy, and so it can preserve the lifetime of itself
when accessing any fields.
PiperOrigin-RevId: 599323122
11 months ago
Sandy Zhang
7c2e9c10d8
Add include for absl/str_cat.h
11 months ago
Protobuf Team Bot
fe6a601598
Auto-generate files after cl/599313198
11 months ago
Eric Salo
7c5ff29979
upb: add upb_MiniTableExtension_CType()
...
PiperOrigin-RevId: 599313198
11 months ago
Protobuf Team Bot
8eb7c63ee7
Correct conformance_cpp to use the requested message type for JSON tests.
...
Before this fix it incorrectly always used the Proto3 test message.
PiperOrigin-RevId: 599285917
11 months ago
Hong Shin
808487918c
Initialize scaffolding for ProxiedWithPresence for Messages
...
We want to return $pb$::FieldEntry<'_, $msg_type$> for msg_mut accessors as opposed to the current state (returning $Msg$Mut directly).
In this CL, we pave the way to implementing field entry returns.
We introduce { MessagePresentMutData, MessageAbsentMutData } and impl { ProxiedWithRawVTable, ProxiedWithRawOptionalVTable }. I initially tried a blanket impl approach, but it collided with the already existing PrimitiveVTable constructs; perhaps worth revisiting post 0.6.
In a followup, we'll flesh out the bodies. Lastly, we'll perform the swapover by
replacing $field$_mut with $field$_entry, updating all related tests.
PiperOrigin-RevId: 599282850
11 months ago
Alyssa Haroldsen
e16dd47999
Implement IntoIterator for &Repeated{View,Mut}
...
googletest matchers use this. Unfortunately, we still can't
use `elements_are!` with them:
https://github.com/google/googletest-rust/issues/351
PiperOrigin-RevId: 599281808
11 months ago
Alyssa Haroldsen
19851968bb
Fix indentation of a macro in simple_nested_test.rs
...
Looks like rustfmt doesn't do it automatically.
PiperOrigin-RevId: 599271261
11 months ago
Sandy Zhang
734e8e6adf
Update sha hash to match new absl commit
11 months ago
Sandy Zhang
c0ab33b520
Update to latest absl RC 20240116.rc1
11 months ago
Kevin King
9bd8dfa639
Add Repeated<Message> accessors
...
Shares logic with Repeated<Scalar> accessors.
PiperOrigin-RevId: 599263714
11 months ago
Protobuf Team Bot
b04a213326
Auto-generate files after cl/599244388
11 months ago
Kevin King
a19ce5b002
Move repeated_scalar.cc to repeated_field.cc
...
Repeated scalars and messages can share the same accessor code.
PiperOrigin-RevId: 599244388
11 months ago
Kevin King
df376c807c
Implement ProxiedInRepeated for Messages
...
PiperOrigin-RevId: 599241012
11 months ago
Protobuf Team Bot
27af4c802f
Auto-generate files after cl/599220883
11 months ago
Protobuf Team Bot
57a0ff8c92
Reserve and extension number in proto2.FeatureSet for Go
...
PiperOrigin-RevId: 599220883
11 months ago
Joshua Haberman
9188b39fb7
Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full.
...
PiperOrigin-RevId: 599218886
11 months ago
Kevin King
b3639a0e9a
Add rust bindings for `upb_Array_GetMutable`
...
PiperOrigin-RevId: 599208395
11 months ago
Protobuf Team Bot
4773c091d2
Also emit the oneof accessors into $Msg$Mut and $Msg$View
...
PiperOrigin-RevId: 599199864
11 months ago