-
Notifications
You must be signed in to change notification settings - Fork 15.6k
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
64 bit integer #3666
Comments
it has been fixed in 3.4 : https://github.com/google/protobuf/releases |
Any chance of using |
Anyone on this? |
I understand adding [jstype = JS_STRING] is an option, however I concern about the performance when I pass millions of bigint through the field
So the ideal case is, if protobuf can support bigint (long.js or native bigint if supported), then we can completely remove above conversions, and we don't pay the cost any more. It will be great if this support can be added. |
I wouldn't personally consider this to be a fix. Imho the default unsafe conversion of 64 bit integers to JavaScript |
We just get bitten by the same issue. Silently not converting a uint64 to its full precision is a real issue. Our server is in Golang and using 64bits integer is a basic thing. I understand the JS limitation but maybe we should consider using an open source uint64 library until it s part of the language (if it ever will) |
According to https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER
So we have problem with 64 bit integers , When I want to open a
uint64
field that is larger than (2^53 - 1) it is rounded to another numberunofficial protobuffer library , https://github.com/dcodeIO/ProtoBuf.js/ , uses https://github.com/dcodeIO/long.js and solved problem
Please use long.js for 64 bit integer
The text was updated successfully, but these errors were encountered: