-
Notifications
You must be signed in to change notification settings - Fork 106
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
feat: support for diffing presence containers #990
base: master
Are you sure you want to change the base?
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
4970f67
to
519ff68
Compare
Hello @wenovus and @robshakir - it took some time, but we finally managed to crack the code. Please review. 😊 |
519ff68
to
58943fa
Compare
Co-authored-by: Terje Lafton <[email protected]>
58943fa
to
8c252eb
Compare
Co-authored-by: Terje Lafton <[email protected]>
Also tagging #645 author, @hansthienpondt. |
Co-authored-by: Terje Lafton <[email protected]>
Hi @robshakir , friendly bump in case you missed this 😊 |
I did miss it -- apologies, let me review ASAP. |
No worries, @robshakir! We’ve been using the fork in production and it’s worked like a charm. |
func (*WithRespectPresenceContainers) IsDiffOpt() {} | ||
|
||
// hasIgnoreAdditions returns the first IgnoreAdditions from an opts slice, or | ||
// nil if there isn't one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
During a self review on my phone right now, I can see this is missing a proper docstring. I’ll fix Monday morning!
Closes #936.
The implementation ended up being somewhat as described in #936, where we indicate that presence container has a
nil
value in thefindSetLeaves
function.In addition to this, we added a presence container interface, which is used in the
marshalStructOrOrderedList
to isolate the presence container which might have values, to act like an empty struct.The result is that we do not break any current tests (even without the diff option), but we decided to add a diff option, with the reasoning described in #936:
We've confirmed this works in our setup. We're able to successfully configure all presence containers, even nested ones.
Co-authored-by: Terje Lafton [email protected]