-
Notifications
You must be signed in to change notification settings - Fork 5
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
Sync android-sdk with js-sdk: Implement updates to v0.4.27 #212
Conversation
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
@@ -11,7 +11,7 @@ android.suppressUnsupportedOptionWarnings=android.suppressUnsupportedOptionWarni | |||
kotlin.code.style=official | |||
kotlin.mpp.stability.nowarn=true | |||
GROUP=dev.yorkie | |||
VERSION_NAME=0.4.25-rc | |||
VERSION_NAME=0.4.27-rc |
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.
I set the RC version because even after the merge this PR, there are still specs to discuss.
yorkie-team/yorkie-js-sdk#865
c1.syncAsync().await() | ||
|
||
// 02. c2 receives the snapshot and increases the counter simultaneously. | ||
// The tc in js-sdk, it performed the sync before update, but it is not necessary. |
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.
As we talked in the offline conversation, calling the sync
function in the js-sdk isn't mandatory.
So I didn't write the code to call the sync
(syncAsync
in android) function, I thought it might cause unnecessary to understand exactly what TC is trying to do.
If you has any thoughts on this, please comment.
@@ -621,4 +623,215 @@ class DocumentTest { | |||
collectJobs.values.forEach(Job::cancel) | |||
} | |||
} | |||
|
|||
@Test | |||
fun test_single_document_event_stream_can_emit_document_status_changed() { |
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.
We doesn't implement this behavior before, but I added this for more detailed validation, I think.
Co-authored-by: Hyowoo Kim <skhugh@gmail.com>
Co-authored-by: Hyowoo Kim <skhugh@gmail.com>
Co-authored-by: Hyowoo Kim <skhugh@gmail.com>
Co-authored-by: Hyowoo Kim <skhugh@gmail.com>
Co-authored-by: Hyowoo Kim <skhugh@gmail.com>
val document2StatusChangedList = mutableListOf<Event.DocumentStatusChanged>() | ||
val jobs = mapOf( | ||
"document1 status changed events" to launch(start = CoroutineStart.UNDISPATCHED) { | ||
document1.events.filterIsInstance<Event.DocumentStatusChanged>() |
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.
just a trivial question, but is there any reason to use a Map
instead of a List
? It seems like you're not using the keys.
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.
I didn't intend to use Map
for anything else.
Actually, as your comment, there was no need to use Map
in another function.
Also, some functions I've written don't need Map
. Maybe it's better to use List
.
but I think it makes sense for naming purposes, so I'll keep it as it is for now.
- And actorID will not pass if status is not attached type.
What this PR does / why we need it?
Applied changes from JS SDK up to 0.4.27.
Not all tasks are complete, so I make the list of tasks below.
0.4.27
0.4.26
0.4.25
doc.subscribe('status', callback)
function yorkie-js-sdk#828Any background context you want to provide?
What are the relevant tickets?
It wasn't limited to just a single task or PR.
Please check below releases, this PR included tasks from versions 0.4.25 through 0.4.27.
https://github.com/yorkie-team/yorkie-js-sdk/releases
Fixes #
Checklist