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

Current implementation of hxFromBytes incompatible with Node 4.x #98

Open
jonasmalacofilho opened this issue Oct 29, 2017 · 1 comment

Comments

@jonasmalacofilho
Copy link
Member

jonasmalacofilho commented Oct 29, 2017

Before hxFromBytes(foo) would generate

new Buffer(foo.b.bufferValue)

but that changed with 19a1e2b (and 9b24a89) to

new Buffer(foo.b.bytes, foo.b.byteOffset, foo.b.byteLength)

However, the history of the new Buffer(arrayBuffer, offset, length) NodeJS constructor isn't as linear as one would hope:

NodeJS new Buffer

Since the constructor isn't supported in Node 4.x, the current implementation has the effect of calling new Buffer(foo.b.bytes), making the new buffer point to the entire underlying array buffer of foo, that will also contain data for other buffers, because of pooling.

jonasmalacofilho referenced this issue in ITDP/the-online-brt-planning-guide Oct 29, 2017
... for now, as we're running Node 4x on the server and `hxFromBytes`
(from hxnodejs/git) no longer supports it.

This reverts commit a31c133.
@lublak
Copy link
Contributor

lublak commented Jan 21, 2019

The Node.js 4.x releases are unsupported since April 2018.
I think we should look to support newest LTS-Build 10.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants