nodejs / readable-stream

Node-core streams for userland
https://nodejs.org/api/stream.html
Other
1.03k stars 225 forks source link

interop broken #501

Open ronag opened 1 year ago

ronag commented 1 year ago

In utils we use:

const kDestroyed = Symbol('kDestroyed') const kIsErrored = Symbol('kIsErrored') const kIsReadable = Symbol('kIsReadable') const kIsDisturbed = Symbol('kIsDisturbed')

But that means that using helper methods with node core stream will give incorrect results. I believe we need to also check the methods from 'stream'.

Alternatively change the core implementation to not use symbols...

ronag commented 1 year ago

See https://github.com/nodejs/undici/pull/1782/commits/213cbfe3acda5d1723d57b92db52a8efb5ffd800

mcollina commented 1 year ago

Is there any way to get those Symbols out from Node.js core? If not, we should make some change there first.