Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove presence tracking from default values #1682

Merged
merged 1 commit into from
Mar 17, 2023

Conversation

mtdowling
Copy link
Member

@mtdowling mtdowling commented Mar 16, 2023

This commit removes the recommendation for using presence tracking default values, and instead advocates for serializing default values. This ensures that whatever an implementation thinks the default value is currently is unambiguoulsy honored by anything that deserializes the message later at any point in time, including if the default value for that member has since changed in the model. This also removes the large amount of complexity that presence tracking brings with it. While this does make it harder for a default value to change in clients, changing defaults is meant to be very rare anyways. So the tradeoff here seems worth it given changing defaults was and continues to be so strongly discouraged.

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

This commit removes the recommendation for using presence tracking
default values, and instead advocates for serializing default values.
This ensures that whatever an implementation thinks the default value
is currently is unambiguoulsy honored by anything that deserializers
the message later at any point in time, including if the default
value for that member has since changed in the model. This also removes
the large amount of complexity that presence brings with it. While
this does make it harder for a default value to change, changing
defaults is meant to be very rare anyways. So the tradeoff here
seems worth it given changing defaults was and continues to be so
strongly discouraged.
@mtdowling mtdowling requested a review from a team as a code owner March 16, 2023 03:03
@mtdowling mtdowling merged commit 609cb16 into main Mar 17, 2023
@mtdowling mtdowling deleted the remove-presence-tracking branch March 21, 2023 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants