Between 0.10 and 0.12, we changed the binary module registration flow in process.dlopen.
This was done for Good Reasons.
I think now in retrospect, it's clear that was a mistake. It dramatically increases the user friction to switch from 0.10 to 0.12. Here's how the flow goes:
- "Hm, this io.js thing looks interesting. Lemme try it out"
- installs io.js
- Error from 5 levels deep in the dep tree: Module did not self-register.
- "Well, that was fun, but it's clearly broken. Back to 0.10!"
If we're lucky, they post an issue, and someone here says, "The problem is the module, go write some C++." In other words, "I believe I did, Bob."
What if we detected a null pointer here https://github.com/nodejs/io.js/blob/c1de6d249e9b17d53edc0a713c1e43ef9b457ea7/src/node.cc#L2130-L2133
and then instead of throwing, fall back to the old DLOpen.
I'm sure that literally zero users would complain if their modules start working.
Between 0.10 and 0.12, we changed the binary module registration flow in process.dlopen.
This was done for Good Reasons.
I think now in retrospect, it's clear that was a mistake. It dramatically increases the user friction to switch from 0.10 to 0.12. Here's how the flow goes:
If we're lucky, they post an issue, and someone here says, "The problem is the module, go write some C++." In other words, "I believe I did, Bob."
What if we detected a null pointer here https://github.com/nodejs/io.js/blob/c1de6d249e9b17d53edc0a713c1e43ef9b457ea7/src/node.cc#L2130-L2133
and then instead of throwing, fall back to the old DLOpen.
I'm sure that literally zero users would complain if their modules start working.