You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'll poke around next week to see if anyone at Netflix or elsewhere is using it (and if so, will try to understand the use case). Personally I haven't used it at all.
It would be nice if we could get data from npm to see if anyone is using it and how. Also, maybe a Twitter poll (not a very scientific method but we have used in the past).
I don't remember the issues regarding multipleResolves, do we have it listed anywhere?
It would be nice if we could get data from npm to see if anyone is using it and how. Also, maybe a Twitter poll (not a very scientific method but we have used in the past).
@benjamingr I don't remember if this was something that could be implemented in userland or not. Is it?
It's not, it's something V8 did just for Node.js and I regret wasting their good-will and time on the feature only to find out at the end there are a ton of cases they resolve promises multiple times in their implementations of stuff like Promise.all / Promise.race which means the hook's value is significantly diminished in practice.
If the hook worked it would have been pretty useful.
Either way, logging is a valid use case IMO. Although 45 files are an indication that it's an underused feature.
I went through all of them and I think the vast majority are just examples of the hook rather than genuine "everyday" usage of the hook. I am happy to also send out an unofficial survey of "Are you familiar with multipleResolves" and "Are you using multipleResolves" if that'd help.
It's not, it's something V8 did just for Node.js and I regret wasting their good-will and time on the feature only to find out at the end there are a ton of cases they resolve promises multiple times in their implementations of stuff like Promise.all / Promise.race which means the hook's value is significantly diminished in practice.
If the hook worked it would have been pretty useful.
Got it. Functionality-wise this seems like something that can be deprecated and removed. I think it's worth adding this context to the OP so others can also make an informed decision.
I went through all of them and I think the vast majority are just examples of the hook rather than genuine "everyday" usage of the hook
That's a relief since reduces the chances of open source packages propagating usage of it. There still might be some relevant usage in private repos that could surface from asking the community.
I am happy to also send out an unofficial survey of "Are you familiar with multipleResolves" and "Are you using multipleResolves" if that'd help
It doesn't have to be unofficial, we can share one through the Node.js account. It can be a twitter poll ("yes, i'm familiar and use", "yes, I'm familiar but don't use", "I'm not familiar but would use", "I'm not familiar and wouldn't use", or just "would you be opposed to deprecating multipleResolves (yes/no)? If no please reach out at #41554 with your use case"), not a sophisticated survey (yes, I'm volunteering to run this poll).
It doesn't have to be unofficial, we can share one through the Node.js account. It can be a twitter poll ("yes, i'm familiar and use", "yes, I'm familiar but don't use", "I'm not familiar but would use", "I'm not familiar and wouldn't use", or just "would you be opposed to deprecating multipleResolves (yes/no)? If no please reach out at #41554 with your use case"), not a sophisticated survey (yes, I'm volunteering to run this poll).
Go for it, I would be interested in what the result would be.
Edit: I'll also run one on the Node.js user group in Facebook I moderate to get some non-twitter data
@benjamingr was trying to figure out how to share a poll with the Node.js account. Just opened an issue in the appropriate repo for folks managing that account to tweet it.
Activity
benjamingr commentedon Jan 16, 2022
@nodejs/diagnostics @nodejs/promises-debugging (if anyone on that team is still active :D)
mcollina commentedon Jan 16, 2022
I'm ok for removing it.
jasnell commentedon Jan 16, 2022
+1 for deprecating
mmarchini commentedon Jan 16, 2022
I'll poke around next week to see if anyone at Netflix or elsewhere is using it (and if so, will try to understand the use case). Personally I haven't used it at all.
It would be nice if we could get data from npm to see if anyone is using it and how. Also, maybe a Twitter poll (not a very scientific method but we have used in the past).
I don't remember the issues regarding multipleResolves, do we have it listed anywhere?
ronag commentedon Jan 16, 2022
+1
Mesteery commentedon Jan 16, 2022
Results with GitHub Code Search: https://github.com/proxy/cs.github.com/?q=%2Fprocess%5C.on%5C%28%28%27%7C%60%7C%22%29multipleResolves%28%27%7C%60%7C%22%29%2F+path%3A%2F%5C.%28j%7Ct%29s%24%2F+NOT+path%3Atypes%2Fnode+NOT+path%3Atest%2Fparallel&p=1&pt=a00d1ffcfe1e424e716bbae943d6d6c61dc49a51ca67500d9bfe4e555b1aac08b249f6a9aafe06dcde2096c36611524f48452981d1ea5c77957c84ddabc6b7ab65438d250327d782956b30ad272f1438e8b79618530378daa3695936203d1ba04cadf090eb3ae2eb5cf4c6ae2c7f8f9d9ba54d4e2878633a29d69e32d1d3065412697f2727cae960d1ff137c99af257cdae86496c77c4f4e3ffbed420317f9da71ff5778cbef378d9e6eba4740d0016cb34c79f7&scopeName=All+repos.
There are 45 files that use it, and mainly for logging.
mmarchini commentedon Jan 16, 2022
@Mesteery GitHub Code Search has a waiting list, so folks can't access the URL unless they already joined :/
Either way, logging is a valid use case IMO. Although 45 files are an indication that it's an underused feature.
@benjamingr I don't remember if this was something that could be implemented in userland or not. Is it?
benjamingr commentedon Jan 17, 2022
It's not, it's something V8 did just for Node.js and I regret wasting their good-will and time on the feature only to find out at the end there are a ton of cases they resolve promises multiple times in their implementations of stuff like Promise.all / Promise.race which means the hook's value is significantly diminished in practice.
If the hook worked it would have been pretty useful.
I went through all of them and I think the vast majority are just examples of the hook rather than genuine "everyday" usage of the hook. I am happy to also send out an unofficial survey of "Are you familiar with multipleResolves" and "Are you using multipleResolves" if that'd help.
mmarchini commentedon Jan 17, 2022
Got it. Functionality-wise this seems like something that can be deprecated and removed. I think it's worth adding this context to the OP so others can also make an informed decision.
That's a relief since reduces the chances of open source packages propagating usage of it. There still might be some relevant usage in private repos that could surface from asking the community.
It doesn't have to be unofficial, we can share one through the Node.js account. It can be a twitter poll ("yes, i'm familiar and use", "yes, I'm familiar but don't use", "I'm not familiar but would use", "I'm not familiar and wouldn't use", or just "would you be opposed to deprecating multipleResolves (yes/no)? If no please reach out at #41554 with your use case"), not a sophisticated survey (yes, I'm volunteering to run this poll).
benjamingr commentedon Jan 17, 2022
Go for it, I would be interested in what the result would be.
Edit: I'll also run one on the Node.js user group in Facebook I moderate to get some non-twitter data
RaisinTen commentedon Jan 18, 2022
+1 with the deprecation. FWIW, we don't use this in Postman.
benjamingr commentedon Jan 18, 2022
So some data from the unofficial poll (asked in the Israeli Node.js group on Facebook):
multipleResolvesmultipleResolvesbut have not used it.Edit: gave it more time, results are similar. Were you able to run a twitter survey by any chance @mmarchini ?
mmarchini commentedon Jan 24, 2022
@benjamingr was trying to figure out how to share a poll with the Node.js account. Just opened an issue in the appropriate repo for folks managing that account to tweet it.
benjamingr commentedon Feb 6, 2022
Looks like the twitter results are similar (there is a minority of "currently using" but 0 comments of how and a big majority for "unfamiliar")
process: deprecate multipleResolves
process: deprecate multipleResolves
process: deprecate multipleResolves
process: deprecate multipleResolves