Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Version 7.5.0 breaks null semantics #2102

Open
@martin-traverse

Description

Hi,

I did some work a while back to implement null semantics for proto3.. The --null-semantics flag in the CLI enables this behaviour. When the flag is set, optional fields in proto3 are made nullable and non-optional fields are not. In the TS interfaces, all fields can be undefined, but only optional fields can be null. This gives natural type-hinting in TS (and JS) - arguably it should be the default, but we agreed to put it behind a flag to keep compatibility.

The 7.5.0 update has broken this logic, and now all fields show up as nullable again (at least for proto3). For the time being I will downgrade our project to protobuf.js 7.4. I'm super busy so not sure when I'll have the chance to fix this again, but we should at least have a ticket open to track it. If anybody else knows what the problem is and can put in a fix before me, that would be even better!

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

        AltStyle によって変換されたページ (->オリジナル) /