Merge branch 'check-conformance'
This commit is contained in:
@@ -296,6 +296,31 @@ after parsing is faster. For workloads that read every field the costs
|
||||
invert; for workloads that read a handful of fields from large messages roto
|
||||
wins.
|
||||
|
||||
## Literature
|
||||
## Protobuf Spec Validation
|
||||
|
||||
https://protobuf.dev/programming-guides/encoding/
|
||||
The goal is to validate roto's implementation against the Proto3 specification.
|
||||
|
||||
### Supported Features
|
||||
|
||||
- **Scalar Types**: `double`, `float`, `int32`, `int64`, `uint32`, `uint64`, `sint32`, `sint64`, `fixed32`, `fixed64`, `sfixed32`, `sfixed64`, `bool`, `string`, `bytes`.
|
||||
- **Messages**: Top-level and nested message definitions.
|
||||
- **Enums**: Enum definitions with `from_i32` conversion.
|
||||
- **Field Labels**: Singular and `repeated` fields.
|
||||
|
||||
### Unsupported Features
|
||||
|
||||
- **Default Values**: Missing fields return `RotoError::FieldNotFound` instead of the Proto3 default value (e.g., `0` or `""`).
|
||||
- **Field Presence**: No `has_field()` methods are generated to distinguish between a field being absent and a field being set to its default value.
|
||||
- **`oneof` Fields**: Not currently supported in code generation.
|
||||
- **`map` Fields**: Not currently supported.
|
||||
- **Packed Repeated Fields**: `roto` expects individual tags for all repeated elements; it does not support the packed encoding used for scalar numeric types in Proto3.
|
||||
- **Reserved Fields**: `reserved` statements are ignored.
|
||||
- **Services**: `service` and `rpc` definitions are ignored.
|
||||
- **Options**: Field and message options are ignored.
|
||||
|
||||
### Tasks
|
||||
|
||||
- [x] Analyze `roto/codegen` to determine which protobuf constructs are supported during code generation.
|
||||
- [x] Analyze `roto/runtime` to determine which wire types and protobuf types are supported during reading and writing.
|
||||
- [x] Compare findings with the Proto3 spec (https://protobuf.dev/reference/protobuf/proto3-spec/).
|
||||
- [x] Document supported and unsupported features in the README.
|
||||
|
||||
Reference in New Issue
Block a user