-
Notifications
You must be signed in to change notification settings - Fork 30.5k
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
fs: add inoString
to fs.Stats
#16857
Conversation
Since `ino` is an unsigned 64-bit integer, it may lost accuracy in JavaScript. This situation may cause some strange bugs in filesystem. So a string type `inoString` is added to `fs.Stats`. Fixes: nodejs#16679 Fixes: nodejs#12115 Refs: http://docs.libuv.org/en/v1.x/fs.html#c.uv_stat_t
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.
@bnoordhuis But how long will that support merge to Node.js? If it's a long time, people who submitted the issue how to resolve this problem so far? |
@@ -364,6 +365,11 @@ object alternate representations of the various times. The `Date` and number | |||
values are not connected. Assigning a new number value, or mutating the `Date` | |||
value, will not be reflected in the corresponding alternate representation. | |||
|
|||
*Note*: Since `ino` is an unsigned 64-bit integer, it may lost accuracy in |
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.
A nit: may lost -> may lose.
I expect it'll be ready for node 10. |
@bnoordhuis IMHO I don't think they want to wait for so long a time since it's next LTS. |
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.
-1 We should just wait for BigInt
@mscdex @bnoordhuis how about to expose a raw uv_stats_t Buffer for developers selves use? |
@XadillaX I'd rather see this done correctly from the get-go. We've already made it this far without many complaints, so I don't see the harm in waiting just a little bit longer for proper big number support in JavaScript. |
Where are a couple of people against landing this and no one else has stood up for wanting this in. |
Since
ino
is an unsigned 64-bit integer, it may lost accuracy inJavaScript. This situation may cause some strange bugs in filesystem. So
a string type
inoString
is added tofs.Stats
.Fixes: #16679
Fixes: #12115
Refs: http://docs.libuv.org/en/v1.x/fs.html#c.uv_stat_t
Checklist
make -j4 test
(UNIX)Affected core subsystem(s)
fs