-
Notifications
You must be signed in to change notification settings - Fork 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
websocket's native dependencies #3685
Comments
This makes a lot of sense. node-gyp is a parasite during build. I think if the fork is as described I wouldn't have an opposition to using this, as long as upstream changes are always kept up to date. We'd greatly appreciate being apart of the forks updates (being tagged is fine, happy to also review) since this could have a large impact. I haven't taken time to review the current PR, perhaps once the fork occurs then I'll dive into it? |
Thanks for your reply, Greg! I forked into https://github.com/nomiclabs/WebSocket-Node and released The relevant diff is just this commit, which mostly deletes files, adds two dependencies, and uses those instead. @nebojsa94, is any other change apart from |
@alcuadrado sorry so is the plan that nomic will continue to maintain the fork? Is there a reason for this? |
I think I misunderstood your last comment, @GregTheGreek. I thought that you were willing to consider this if there was already a fork, so I went ahead and forked it. We are ok with maintaining the fork, even if web3 is the only consumer. If you think that the fork should be managed by web3, that's even better for us. TBH this is the option I'd choose if I were maintaining web3, so feel free to do it. For context, |
Ahh, ok I misunderstood your comment before as well. Thanks for forking it! I gave it a test and tagged you, it's quite promising! Id be happy to maintain it. Do you mind if I fork your changes ? |
Nope, that is the only one! |
No problem! |
@alcuadrado - I've incorporated the N-API changes upstream and released a new version of |
Thanks a lot, @theturtle32! 🙌 |
@theturtle32 :This_is_me_jumping_for_joy: thanks!!! |
Hi,
I'm creating this issue because at Nomic Labs and Tenderly we've been working on removing node-gyp based native dependencies form the ecosystem. We already mentioned this in other issues/pull requests here. There's more info here: ethereum/js-team-organization#18
One of the few packages that requires recompiling native dependencies on install is
web3
, as it useswebsocket
. Note that asweb3
is used by lots of other tools, this project won't finish here, but we need to coordinate with manyweb3
consumers so they update their versions.Intially, we tried replacing
websocket
withwc
, but that's not feasible, so we tried to fix this upstream. There's already a PR doing it, which the author ofwebsocket
said is ok but never merged nor released.I'm opening this issue to discuss if
web3
shouldn't forkwebsocket
and incorporate those changes instead of waiting for an upstream release. This would let us continue this effort while we wait for upstreamwebsocket
to catch up.This decision shouldn't be taken lightly, so here's an explanation of what the fork does:
websocket
has two tiny modules that are written in C -- just utf8 validation and someBuffer
helpers.websocket
wc
wc
keeps those modules as separate npm packageswebsocket
PR removes the imported modules, and usedwc
's npm packages instead.What do you think?
/cc @nebojsa94
The text was updated successfully, but these errors were encountered: