-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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!