* Mark `AnyInitializer` as `ABSL_NULLABILITY_COMPATIBLE`, and constructible from
  literal `nullptr`.

  This catches constructing `absl_nonnull AnyInitializer` from an
  `absl_nullable` value (or literal `nullptr`), and constructing
  `absl_nonnull Any` from `absl_nullable AnyInitializer`.

  `AnyInitializer` cannot support `operator==` which would be consistent with
  `Any`, because it is consumable only once and the `Handle` is not known until
  it is consumed.

* Mark `Initializer` as `ABSL_NULLABILITY_COMPATIBLE`.

  This catches constructing `absl_nonnull Initializer<T>` from an
  `absl_nullable` value (or literal `nullptr`), which is meaningful when
  `T` supports nullability.

  This does not catch constructing `absl_nonnull T` from
  `absl_nullable Initializer<T>` however, because that is implemented as a
  conversion operator of `Initializer<T>` rather than a constructor of `T`.

* Remove `ABSL_NULLABILITY_COMPATIBLE` from `TypeErasedRef`, and rename its
  `== nullptr` to `empty()`.

  `TypeErasedRef` constructor takes a reference, not a pointer, and constructing
  it from `nullptr` is not empty but refers to `nullptr`. This could be
  incorrectly caught as violating nullability annotations.

  Nullability annotations at `TypeErasedRef` are not very useful anyway because
  it is normally an implementation detail of type-erasing classes, not used in
  public API.

PiperOrigin-RevId: 797165006
7 files changed
tree: b2312975f8bc89064039ffd68a4e0a243b83fabf
  1. doc/
  2. python/
  3. riegeli/
  4. tf_dependency/
  5. .bazelrc
  6. configure
  7. CONTRIBUTING.md
  8. LICENSE
  9. MANIFEST.in
  10. MODULE.bazel
  11. README.md
README.md

Riegeli

Riegeli/records is a file format for storing a sequence of string records, typically serialized protocol buffers. It supports dense compression, fast decoding, seeking, detection and optional skipping of data corruption, filtering of proto message fields for even faster decoding, and parallel encoding.

See documentation.

Status

Riegeli file format will only change in a backward compatible way (i.e. future readers will understand current files, but current readers might not understand files using future features).

Riegeli C++ API might change in incompatible ways.