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
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: 625084569
- Only call GetUtf8CheckMode once per field.
- Avoid vector reallocations in GenerateFieldNames by sizing it correctly from the start and using pointers to write to it instead of push_back.
- Stop making a temporary array of names. We cache GetUtf8CheckMode so testing for it again is cheaper.
PiperOrigin-RevId: 624986618
We will be punting on actual implementation of lifetime verification during dynamic builds, but in the future leaning towards the simplified algorithm.
PiperOrigin-RevId: 624937514
The shared tests which access `protobuf_upb` or `protobuf_cpp`
have access to more items than the `protobuf` library itself.
This is because the former don't go through the same re-exporting based
on kernel.
I fix this by creating two test-only libraries that perform the same re-exporting
as the `protobuf` library, but with the kernel explicitly set, and changing the shared
tests to reference that instead of the inner runtime library.
This is needed to reliably test macros, where item paths are relative to the invocation,
not eagerly checked at the macro source.
PiperOrigin-RevId: 624328817
The intent of this directory would be for a layer of Rust bindings that directly map to upb semantics; Rust Protobuf runtime would be layer on top of that Rust, instead of directly on the upb C api.
PiperOrigin-RevId: 624282429