Previously, these List.get methods returned Object, forcing boxing, and (if not in the primitive's box cache) allocation, with all the cost that entails.
I've taken the approach of duplicating methods to specialise for primitives, like BinaryWriter does for non-lite protos.
I initially considered checking the class of the list on every iteration of the
loop, but that feels wasteful, when we can
check it once at the start of the loop. This also means we have the same
behaviour as serverside protos. At the cost of a few more methods, but
hopefully they're trivially inlineable, so hopefully leading to a small dex increase without really increasing the method count.
Given this is a public API, I don't think we can remove the List<Long> overloads either.
PiperOrigin-RevId: 627183583
This will allow them to reuse our bazelrc and remote caching setup. This also silences the non-bzlmod windows test that's hitting the windows path length.
PiperOrigin-RevId: 626390416
Instead of hardcoding static libraries, allow using the BUILD_SHARED_LIBS behaviour to allow the build of shared utf8 libraries.
Closes#14867
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/14867 from Chekov2k:main 971562ba47
PiperOrigin-RevId: 626125210
We're seeing a high flake rate due to remote cache-misses only on Bazel 7 builds. The key change here seems to be adding the remote_download_output flag, but this also upgrades us to 7.1.1 and adds some retry behavior to caching issues.
PiperOrigin-RevId: 625892332
Once an edition is released these should be fixed forever. On the other hand, the fixed defaults may see new features included as we change legacy behaviors in future editions.
PiperOrigin-RevId: 625842071
All of this information is still available by merging fixed_features and overridable_features. This new split will make validation easier for runtimes that need to do dynamic builds.
PiperOrigin-RevId: 625815212
Instead of rewriting the field type, just leave it alone. This will only be a potential behavior change for people calling DescriptorPool::InternalSetLazilyBuildDependencies directly. Our normal codegen path already sets field types correctly and is unaffected.
PiperOrigin-RevId: 625807209
The new fields fixed_features and overridable_features can be simply merged to recover the old aggregate defaults. By splitting them though, plugins and runtimes get some extra information about lifetimes for enforcement.
PiperOrigin-RevId: 625527117
The only public target here is the edition defaults helper macro, which can be used by external runtimes and plugins. None of this code is C++-specific though, and should be organized higher up. Appropriate aliases are also placed at the top level for public targets
PiperOrigin-RevId: 625392504