dproto icon indicating copy to clipboard operation
dproto copied to clipboard

Regression: No way to find out if optional field has been set or not

Open Marenz opened this issue 8 years ago • 5 comments

2.0.0 breaks this functionality which was available in 1.3.x.

Marenz avatar Jun 16 '16 11:06 Marenz

Just for the sake of tying things together, you opened #68 at one point to get this fixed.

msoucy avatar Jun 23 '16 00:06 msoucy

Yeah, but it's not working and I don't have the time. And so it won't get forgotten I opened this issue.

Marenz avatar Jun 23 '16 09:06 Marenz

Any suggestions how this would be implemented? I am still stuck on version 1 because of this regression

Marenz avatar Sep 26 '16 11:09 Marenz

The functionality of std.typecons.Nullable should be accessible on optional fields currently. Is this not the case?

msoucy avatar Oct 05 '16 00:10 msoucy

Sure, the isNull() stuff and all is available, but it doesn't help because it doesn't contain the information wether an optional field was set or not. As already mentioned in the original issue that introduced the new "feature" https://github.com/msoucy/dproto/issues/63#issuecomment-192536785, optional fields get a default value (if they don't happen to be type message) and thus are no longer null, thus you have no idea if they actually have been set or not. Basically the nullable wrap is worthless. Sadly noone seemed to care when I addressed that in the issue.

Marenz avatar Oct 05 '16 10:10 Marenz