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 jstype=string from .proto and replace Long with Bigintin js-sdk #1023

Closed
JOOHOJANG opened this issue Oct 1, 2024 · 2 comments · Fixed by #1040 or yorkie-team/yorkie-js-sdk#912
Assignees
Labels
enhancement 🌟 New feature or request

Comments

@JOOHOJANG
Copy link
Contributor

What would you like to be added:
Remove jstype=JS_STRING notation from resources.proto and replace Long with Bigint in js-sdk
AS-IS

message ChangeID {
  ....
  int64 server_seq = 2 [jstype = JS_STRING];
  int64 lamport = 3 [jstype = JS_STRING];
  .....
}

TO-BE

message ChangeID {
  ....
  int64 server_seq = 2 
  int64 lamport = 3 
  .....
}

Why is this needed:
Currently, we're using jstype=JS_STRING notation in resources.proto due to javascript's int64 expression.
Since javascript support Bigintfrom ES2020, now we can remove jstype=JS_STRING notation from resources.proto and replace Long with Bigint.

I tested in some environments and it works well.

@Aswinr24
Copy link
Contributor

Can I pick up this Issue? Would love to work on this

@Aswinr24
Copy link
Contributor

So this issue basically needs two PRs right @hackerwins, one addressing the jstype=string issue in this main repository and the other related to replacing long with BigInt for the yorkie js-sdk repository ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 🌟 New feature or request
Projects
Status: Done
3 participants