You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Axel (Jira)" <ji...@apache.org> on 2021/10/25 11:46:00 UTC
[jira] [Commented] (THRIFT-4803) Fix 64-bit nodejs math by
switching from node-int64 to long or bignum
[ https://issues.apache.org/jira/browse/THRIFT-4803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17433706#comment-17433706 ]
Axel commented on THRIFT-4803:
------------------------------
We are willing to work on this, as we are using thrift in a browser and every node dependency less is good for us. However, I am wondering: Can we ditch support for node-int64 and only go for javascript's native variant? I am asking as thrift also depends on json-node64 and this needs to be ported to json-bigint. I havent looked into details yet, but having a "switch" to support both variants seems not straight forward.
Opinions?
From what I get from the web is that nodejs supports native bigint since v10.4, however, not everyone might be happy change their code.
> Fix 64-bit nodejs math by switching from node-int64 to long or bignum
> ---------------------------------------------------------------------
>
> Key: THRIFT-4803
> URL: https://issues.apache.org/jira/browse/THRIFT-4803
> Project: Thrift
> Issue Type: Improvement
> Components: Node.js - Compiler, Node.js - Library
> Affects Versions: 0.12.0
> Reporter: James E. King III
> Priority: Minor
> Labels: Breaking-Change
>
> The package node-int64 allows for storage of 64-bit integers but it does not allow for integer arithmetic. There are solutions for this, for example the packages {{long}}, {{bignum}}, {{bigint}}. We should switch to one of these, even though it is a breaking change, as it improves i64 behavior. This would be a breaking change; folks can continue to use 0.12.0 if they don't want to change their code.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)