What's needed?
The protobuf package, originally named types, was renamed to type in version v1alpha7 to align with Google's naming conventions, as seen in their google/type package.
While this change creates consistency with Google's APIs, it introduces a stylistic and ergonomic issue in Rust. Since type is a reserved keyword in Rust, developers must use the raw identifier r#type to reference the generated module.
For example, what would ideally be use crate::frequenz::api::common::v1alpha7::type; becomes use crate::frequenz::api::common::v1alpha7::r#type;.
This required use of r#type is not idiomatic in Rust and can be considered stylistically unclean. We should evaluate whether the benefit of aligning with Google's naming convention outweighs the negative impact on the developer experience in Rust.
Proposed solution
Revert it back to types.
Use cases
No response
Alternatives and workarounds
No response
Additional context
No response
What's needed?
The protobuf package, originally named
types, was renamed to type in versionv1alpha7to align with Google's naming conventions, as seen in theirgoogle/typepackage.While this change creates consistency with Google's APIs, it introduces a stylistic and ergonomic issue in Rust. Since
typeis a reserved keyword in Rust, developers must use the raw identifierr#typeto reference the generated module.For example, what would ideally be use
crate::frequenz::api::common::v1alpha7::type;becomesuse crate::frequenz::api::common::v1alpha7::r#type;.This required use of
r#typeis not idiomatic in Rust and can be considered stylistically unclean. We should evaluate whether the benefit of aligning with Google's naming convention outweighs the negative impact on the developer experience in Rust.Proposed solution
Revert it back to types.
Use cases
No response
Alternatives and workarounds
No response
Additional context
No response