Protobuf Team Bot
42fe8b9927
Auto-generate files after cl/573014410
1 year ago
Sandy Zhang
6889aed460
Check-in bootstrapped Java features for Bazel and CMake
...
PiperOrigin-RevId: 573014410
1 year ago
Mike Kruskal
c0004a8fb1
Internal changes
...
PiperOrigin-RevId: 573005248
1 year ago
Mike Kruskal
58722b10c9
Internal change
...
PiperOrigin-RevId: 572987133
1 year ago
Jie Luo
656d62ae32
internal change
...
PiperOrigin-RevId: 572965793
1 year ago
Protobuf Team Bot
312986896d
Disable Bzlmod explicitly in .bazelrc
...
This will help make sure [Bazel Downstream Pipeline](https://github.com/bazelbuild/continuous-integration/blob/master/docs/downstream-testing.md ) is green after enabling Bzlmod at Bazel@HEAD
See https://github.com/bazelbuild/bazel/issues/18958#issuecomment-1749058780
Related https://github.com/protocolbuffers/protobuf/issues/14313
Closes: https://github.com/protocolbuffers/protobuf/pull/14314
PiperOrigin-RevId: 572920528
1 year ago
Marcel Hlopko
edee290572
Use protobuf_nowkt as a dependency of the Rust runtime.
...
IIUC that's what runtimes should depend on.
PiperOrigin-RevId: 572880936
1 year ago
Protobuf Team Bot
0401c70b92
Internal change
...
PiperOrigin-RevId: 572664792
1 year ago
Hong Shin
b823f7f826
Move {child_parent_test, reserved_test, serialization_test} to googletest-rust
...
PiperOrigin-RevId: 572657135
1 year ago
Mike Kruskal
15c04bf1bc
Make generators explicitly specify their support window for editions.
...
Plugins should not get automatically bumped to the latest edition until they're ready to support it.
PiperOrigin-RevId: 572638914
1 year ago
Protobuf Team Bot
1df8ea4988
`RepeatedPtrField::Add` is ~5% faster.
...
Moving logic to one place allows to remove a branch on `using_sso()`.
Side effect: `.strtab` section increases in size (to store function names), `.text` section reduces in size (less inlined code).
```
name old time/op new time/op delta
BM_RepeatedPtrField_Add_Sso 11.0ns ± 4% 10.4ns ± 7% -5.71% (p=0.000 n=83+85)
BM_RepeatedPtrField_Add_FallbackToRep 21.8ns ± 4% 20.8ns ± 5% -4.55% (p=0.000 n=80+83)
BM_RepeatedPtrField_Add_Small 17.3ns ± 4% 15.8ns ± 5% -8.86% (p=0.000 n=78+85)
BM_RepeatedPtrField_Add_Large 22.6ns ±12% 21.1ns ±10% -6.62% (p=0.000 n=100+92)
BM_RepeatedPtrField_Add_HasCleared 4.15ns ±11% 4.43ns ± 6% +6.67% (p=0.000 n=82+87)
BM_RepeatedPtrField_AddAllocated 12.0ns ±19% 12.0ns ±14% ~ (p=0.678 n=92+96)
name old INSTRUCTIONS/op new INSTRUCTIONS/op delta
BM_RepeatedPtrField_Add_Sso 101 ± 1% 88 ± 2% -13.05% (p=0.000 n=100+100)
BM_RepeatedPtrField_Add_FallbackToRep 222 ± 1% 206 ± 1% -7.35% (p=0.000 n=100+100)
BM_RepeatedPtrField_Add_Small 180 ± 0% 164 ± 1% -8.69% (p=0.000 n=100+100)
BM_RepeatedPtrField_Add_Large 110 ± 0% 100 ± 0% -9.07% (p=0.000 n=100+99)
BM_RepeatedPtrField_Add_HasCleared 27.6 ± 1% 36.6 ± 1% +32.44% (p=0.000 n=100+100)
BM_RepeatedPtrField_AddAllocated 114 ± 7% 115 ±11% +0.95% (p=0.007 n=100+100)
```
PiperOrigin-RevId: 572634616
1 year ago
Mike Kruskal
fdcb5d17b9
Use large runners for ASAN and MSAN builds
...
These tests were right near the threshold for disk space on default runners, and recently got pushed over (~18G). The cheapest large runner has 150G of SSD storage, and won't likely hit this issue again.
PiperOrigin-RevId: 572596499
1 year ago
Mike Kruskal
92513fa853
Upgrade setup-dotnet action to hopefully improve network flakes.
...
PiperOrigin-RevId: 572595942
1 year ago
Mike Kruskal
3813b6622f
Implement proto2/proto3 with editions
...
This change migrates proto2 and proto3 to real editions, without impacting users at all. While we already had feature defaults set, we weren't really using them outside of editions. This change introduces InferLegacyProtoFeatures, which infers features from descriptors. Any language that wants to follow this rollout pattern will need to implement similar transformations.
PiperOrigin-RevId: 572593956
1 year ago
Sandy Zhang
9ad2268544
Remove synthetic oneofs from Java gencode field accessor tables.
...
This is needed to unblock Java editions codegen tests, due to codegen diff for proto3 optionals migrated to editions.
This is incompatible with runtimes <24.x, but our cross-version support policy explicitly does not guarantee compatibility for new gencode with old runtimes: https://protobuf.dev/support/cross-version-runtime-guarantee/#minor
PiperOrigin-RevId: 572578693
1 year ago
Eric Salo
f0392ecc42
upb: s/std::endl/'\n' in upb_generator
...
PiperOrigin-RevId: 572511446
1 year ago
Mike Kruskal
e237925b05
Temporarily disable ASAN and MSAN C++ tests due to disk space issues on the github runners.
...
PiperOrigin-RevId: 572427239
1 year ago
Protobuf Team Bot
6ceacd6338
Auto-generate files after cl/572366502
1 year ago
Protobuf Team Bot
126a64517e
Automated rollback of commit 40bed71a88
.
...
PiperOrigin-RevId: 572366502
1 year ago
Eric Salo
c38ba8d8be
upb: unroll a loop in upb_generator that only needs to iterate once
...
PiperOrigin-RevId: 572332570
1 year ago
Eric Salo
ec69a0af63
upb: s/NULL/nullptr in C++ unit tests
...
PiperOrigin-RevId: 572320485
1 year ago
Mike Kruskal
4554699ee5
Prohibit setting LEGACY_REQUIRED by default at the file level
...
PiperOrigin-RevId: 572320452
1 year ago
Protobuf Team Bot
97a239446c
Add comment to clarify intended use of EmitPubUseForImportedMessages.
...
PiperOrigin-RevId: 572309923
1 year ago
Kurt Alfred Kluever
833ded7298
Clean up assertions in `DurationsTest` and `TimestampsTest` a bit.
...
PiperOrigin-RevId: 572279223
1 year ago
Hong Shin
19aad63844
Migrate accessors_test.rs to googletest-rust
...
The flexibility of googletest-rust looks promising:
```
assert_that!(msg.oneof_field(), matches_pattern!(not_set(_)));
assert_that!(msg.oneof_field(), matches_pattern!(OneofUint32(eq(7))));
+nonfatal assertions + custom matchers
```
PiperOrigin-RevId: 572272465
1 year ago
Protobuf Team Bot
499dd1c3f4
Auto-generate files after cl/572264242
1 year ago
Protobuf Team Bot
8f8513835c
Timestamps.parse: Add error handling for invalid hours/minutes in the timezone offset.
...
Before this CL, bad offsets result in a NumberFormatException (from parseLong) instead of the documented ParseException/IllegalArgumentException.
PiperOrigin-RevId: 572266056
1 year ago
Mike Kruskal
f74de36fb5
Add clarifying comments about fields disallowed in Editions
...
PiperOrigin-RevId: 572264242
1 year ago
Sam McCall
7881433762
Use absl's wrappers around __has_attribute etc rather than polyfilling.
...
The goal is to reduce the surface area and size of port_def.inc, as a somewhat
magic textual header.
(Also #defining __reserved_names is a bit of a maintenance risk)
PiperOrigin-RevId: 572188636
1 year ago
Chris Kennelly
e032784c57
Unconditionally poison RepeatedPtrField array after destruction.
...
Prior to RepeatedPtrField having an SOO, we did this for all sizes. This
poisoning step can aid debugging for use-after-frees.
PiperOrigin-RevId: 572115487
1 year ago
Protobuf Team Bot
e80b8ec620
Make JSON UTF-8 boundary check inclusive of the largest possible UTF-8 character.
...
UTF-8 acceptable codepoints are 0x0000-0x10FFFF, previously we treated this as an inclusive-exclusive bound, but UTF-8 does include it's topmost character.
PiperOrigin-RevId: 572111435
1 year ago
Mike Kruskal
d0d52fe3fa
Remove reflection during feature resolution.
...
Instead, we will hardcode the feature validation using macros and add a reflective test to make sure it stays in sync. Reflection during descriptor builds is problematic, and in order to migrate proto2/proto3 to editions fully, we'll need to do feature resolution in *all* builds.
PiperOrigin-RevId: 572054031
1 year ago
Eric Salo
745eff7951
upb: fix staleness tests
...
PiperOrigin-RevId: 572051108
1 year ago
Protobuf Team Bot
2b7a816256
Auto-generate files after cl/572041162
1 year ago
Jie Luo
41af1d53a2
loosen upb for json name conflict check in proto2 between json name and field
...
name. Once editions is supported this check should turn into a check on LEGACY_BEST_EFFORT
PiperOrigin-RevId: 572041162
1 year ago
Protobuf Team Bot
c120126e03
Revert the change to `size_type` to keep the public API using `size_t`.
...
Use a different alias for the internal implementation.
PiperOrigin-RevId: 572030534
1 year ago
Mike Kruskal
863b9d3190
Add additional proto validation to descriptor builds.
...
These would normally be caught by the parser, but would be bypassed by dynamic descriptor builds.
PiperOrigin-RevId: 572010482
1 year ago
Hong Shin
55fb27df28
Enable editions support for rust
...
PiperOrigin-RevId: 571956899
1 year ago
Protobuf Team Bot
95d2b2ed50
Reduce `Map::size_type` to 32-bits. Protobuf containers can't have more than
...
2^32 elements anyway because they are not serializable.
This saves 16 bytes for each `map` field.
PiperOrigin-RevId: 571943973
1 year ago
Protobuf Team Bot
d14a336a6b
Auto-generate files after cl/571636273
1 year ago
Eric Salo
5b6543edb5
upb: first attempt at implementing name mangling for minitable symbols
...
PiperOrigin-RevId: 571636273
1 year ago
Protobuf Team Bot
99e659c1e0
Auto-generate files after cl/571469875
1 year ago
Protobuf Team Bot
40bed71a88
GetArena() instead of GetOwningArena()
...
PiperOrigin-RevId: 571469875
1 year ago
Protobuf Team Bot
777d6a9d4f
Auto-generate files after cl/571462941
1 year ago
Protobuf Team Bot
6b00befa40
Internal change
...
PiperOrigin-RevId: 571462941
1 year ago
Sandy Zhang
66ce451cce
Ensure generator classes have Context with generator options and pass to field comment helpers.
...
Previously, some but not all of these classes stored `Context* context_`.
These will be used in a followup change to consider strip_nonfunctional_codegen in field comments.
PiperOrigin-RevId: 571419303
1 year ago
Mike Kruskal
3221b48dfa
Fix cache cleaning workflow
...
PiperOrigin-RevId: 571375376
1 year ago
Martijn Vels
d41b9e7a4b
Internal change
...
PiperOrigin-RevId: 571309279
1 year ago
Protobuf Team Bot
9a2e785d1d
Adding a DownCastToGenerated function, similar to DynamicCastToGenerated but without the runtime cost of dynamic_cast. The cast is checked in debug mode.
...
Also, add reference overloads of DynamicCastToGenerated which terminate on failure like dynamic_cast would do on an environment without exceptions.
PiperOrigin-RevId: 571241355
1 year ago
Protobuf Team Bot
20ba4c4597
Auto-generate files after cl/571177924
1 year ago