Skip to content

"optional" is no longer a valid keyword in proto3 files #14

@Qix-

Description

@Qix-

When trying to codegen with Prost, I came across an issue with chat.proto:

Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default.

I'm not familiar with protobuf's newest syntax/formats but it appears that there's some legacy syntax in here that isn't otherwise being picked up by the Python codegen tools that is being caught by other tools in the ecosystem.

Removing them all made Prost happy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions