- Potential warnings related to sign conversions.
- Potential warnings around implicit 64/32 bit issues.
- Unneeded conversions.
PiperOrigin-RevId: 721000930
An opt-out flag `--define=protobuf_allow_msvc=true` will be available until our 2026 breaking release 34.0. See https://github.com/protocolbuffers/protobuf/issues/20085 for more details.
#test-continuous
PiperOrigin-RevId: 720822739
- Switch our MSAN tests to use Memory instead of MemoryWithOrigins
- Enable minimal (-O1) optimizations for all sanitized builds
The new optimization shook loose some ODR issues we've hit before due to the cyclic dependency of cc_proto_library. This will fix itself once we finish taking over the rule, and shouldn't affect users. It can be worked around by forcing static linkage in sanitized builds.
#test-continuous
PiperOrigin-RevId: 720686491
When generating skipmaps, the parse function generator keeps track of a
"line_entries" variable that's mostly introduced to condense line wrapping in
some cases where the number of entries is small. This does make the generated
code a bit shorter but it's also keeping track of a lot of state that hinders
readability. It's been raised in a separate CL review that maybe all this
additional complexity is not worth it. We can deal with a few extra generated
lines in the codegen.
PiperOrigin-RevId: 720671921
In particular, reworked `MapFieldAccessor` to be a minimalistic subclass of `RepeatedPtrFieldMessageAccessor`, with only 2 overrides of transitive virtual APIs inherited from `RepeatedPtrFieldWrapper<>`.
PiperOrigin-RevId: 720647073
These tests are currently flaky but should be fixed soon by a new image
rollout.
I plan on rolling back this change in a couple of days once the issue is fixed.
PiperOrigin-RevId: 720598019
The api signatures aren't changed, just internal casting it used
to avoid making an API change which could be considered breaking.
PiperOrigin-RevId: 720547989
It is now possible to initialize a field of type `map<string, Message>` with nested dict objects:
```
storage_pb2.Directory(
name='/home/user',
owner='user',
content={
'.bashrc': dict( # <=== dict() allowed here
size=1234,
permissions='PRIVATE',
),
},
)
```
PiperOrigin-RevId: 719437601
This introduces both the basic plumbing for generating metadata (guarded by compiler flags), as well as the initial output of metadata for messages and fields. We largely follows the outline used in the C++ generator.
The second part requires a bit of refactoring on the `FieldGenerator` class since it assumed it was only storing plain string substitutions.
This does not implement cross-references for all symbols (e.g. enums and oneofs); these will be done in followups.
PiperOrigin-RevId: 719269040
This allows us to use `io::Printer::Sub`'s more advanced features, like automatically adding references to symbols in output metadata. We need a new utility class because a lot of code in this generator depends on overwriting placeholders, as well as looking up existing ones.
PiperOrigin-RevId: 719268162
The original code worked in practice only because the pointed-to type is always `void`, and `void**` is convertible to `void*` (ignoring constness).
PiperOrigin-RevId: 719003773
These are currently some of our slowest tests, reliably taking ~26 minutes each. This should speed up our CI significantly
PiperOrigin-RevId: 718963277
Remove some of the legacy union fields from the structs used for
the generated code. The library has already declared it doesn't
support these old formats (via the version check done by the
C pre processor).
PiperOrigin-RevId: 718846100
The type is internal to the generated code/runtime and isn't exposed
in any public api, so go ahead and move it into the Descriptor private
header.
PiperOrigin-RevId: 718383227
The type is internal to the generated code/runtime and isn't exposed
in any public api, so go ahead and move it into the Utilies private
header.
PiperOrigin-RevId: 718032947