You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently a has and clear method is generated for each property we create for extension fields. But for repeated fields, that's sorta pointless. It makes more sense to treat them like normal message fields, and just let folks use isEmpty and assignment to the empty list for these.
While they should strip away if not used, the problem is the file is generated with visibility public then the code likely comes along and lives in the final framework or binary (SR-521, SR-1021).
To transition to this, we could generated the current ones, but tag them with Swift's @available to tag the current ones as deprecated and then eventually drop them.
The text was updated successfully, but these errors were encountered:
Setting a repeated extension field to an empty array would result it that value
being stored, so has* came back at true even though there was nothing to include
in binary serialization.
In addition to fixing that bug be behavior, this clears the way for eventually
deprecating/removing the generation of has*/clear* for repeated extension
properties.
Progress on apple#944
Setting a repeated extension field to an empty array would result it that value
being stored, so has* came back at true even though there was nothing to include
in binary serialization.
In addition to fixing that bug be behavior, this clears the way for eventually
deprecating/removing the generation of has*/clear* for repeated extension
properties.
Progress on #944
thomasvl
added a commit
to thomasvl/swift-protobuf
that referenced
this issue
Mar 7, 2022
Currently a
has
andclear
method is generated for each property we create for extension fields. But for repeated fields, that's sorta pointless. It makes more sense to treat them like normal message fields, and just let folks useisEmpty
and assignment to the empty list for these.While they should strip away if not used, the problem is the file is generated with visibility
public
then the code likely comes along and lives in the final framework or binary (SR-521, SR-1021).To transition to this, we could generated the current ones, but tag them with Swift's
@available
to tag the current ones as deprecated and then eventually drop them.The text was updated successfully, but these errors were encountered: