News for hackers. Stuff that matters.
Re:Modern Node.js Patterns by panzi on Sunday August 03, 2025 @09:39PM (#44781368)
So they did change it! Good.

I definitely had a crash like that a long time ago, and you can find multiple articles describing that behavior. It was existing for quite a time, so I didn't think that is something they would fix so I didn't keep track of it.

Re:Modern Node.js Patterns by kaoD on Monday August 04, 2025 @05:40AM (#44783657)
Perhaps you're confusing it with something else? I tried down to Node 8 (2017) and the behavior is still the same.

Maybe a bug in userspace promises like Bluebird? Or an older Node where promises were still experimental?

I love a good mystery!

Re:Modern Node.js Patterns by panzi on Monday August 04, 2025 @11:11PM (#44793940)
Weird. Also just tried it with v8 and it doesn't behave like I remember and also not like certain descriptions that I can find online. I remember it because I was so extremely flabbergasted when I found out about this behavior and it made me go over all of my code replacing any Promise.all() with Promise.allSettled(). And it's not just me, this blog post talks about that behavior:

https://chrysanthos.xyz/article/dont-ever-use-promise-all/

Maybe my bug was something else back then and I found a source claiming that behavior, so I changed my code and as a side effect my bug happened to go away coincidentally?

Re:Modern Node.js Patterns by kaoD on Tuesday August 05, 2025 @04:38AM (#44795685)
It could be this: https://stackoverflow.com/questions/67789309/why-do-i-get-an...

If you did something like:

    const p1 = makeP1();
    const p2 = makeP2();

    return await Promise.all([p1, p2]);
It's possible that the heuristic didn't trigger?