{"action":"created","issue":{"url":"https://api.github.com/repos/nodejs/io.js/issues/1887","labels_url":"https://api.github.com/repos/nodejs/io.js/issues/1887/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/io.js/issues/1887/comments","events_url":"https://api.github.com/repos/nodejs/io.js/issues/1887/events","html_url":"https://github.com/nodejs/io.js/issues/1887","id":84722073,"number":1887,"title":"\"Module did not self-register.\" <-- This is a problem.","user":{"login":"isaacs","id":9287,"avatar_url":"https://avatars.githubusercontent.com/u/9287?v=3","gravatar_id":"","url":"https://api.github.com/users/isaacs","html_url":"https://github.com/isaacs","followers_url":"https://api.github.com/users/isaacs/followers","following_url":"https://api.github.com/users/isaacs/following{/other_user}","gists_url":"https://api.github.com/users/isaacs/gists{/gist_id}","starred_url":"https://api.github.com/users/isaacs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isaacs/subscriptions","organizations_url":"https://api.github.com/users/isaacs/orgs","repos_url":"https://api.github.com/users/isaacs/repos","events_url":"https://api.github.com/users/isaacs/events{/privacy}","received_events_url":"https://api.github.com/users/isaacs/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nodejs/io.js/labels/c++","name":"c++","color":"e11d21"},{"url":"https://api.github.com/repos/nodejs/io.js/labels/discuss","name":"discuss","color":"02d7e1"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-06-03T19:01:31Z","updated_at":"2015-06-03T23:50:32Z","closed_at":null,"body":"Between 0.10 and 0.12, we changed the binary module registration flow in process.dlopen.\r\n\r\nThis was done for Good Reasons.\r\n\r\nI 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:\r\n\r\n1. \"Hm, this io.js thing looks interesting.  Lemme try it out\"\r\n2. installs io.js\r\n3. Error from 5 levels deep in the dep tree: **Module did not self-register.**\r\n4. \"Well, that was fun, but it's clearly broken.  Back to 0.10!\"\r\n\r\nIf 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.\"](http://b.z19r.com/upload/did-you-just-tell-me-to-go-fuck-myself.jpg)\r\n\r\nWhat if we detected a null pointer here https://github.com/nodejs/io.js/blob/c1de6d249e9b17d53edc0a713c1e43ef9b457ea7/src/node.cc#L2130-L2133\r\nand then instead of throwing, fall back to the [old DLOpen](https://github.com/nodejs/node/blob/v0.10/src/node.cc#L2069).\r\n\r\nI'm sure that literally zero users would complain if their modules start working."},"comment":{"url":"https://api.github.com/repos/nodejs/io.js/issues/comments/108649396","html_url":"https://github.com/nodejs/io.js/issues/1887#issuecomment-108649396","issue_url":"https://api.github.com/repos/nodejs/io.js/issues/1887","id":108649396,"user":{"login":"isaacs","id":9287,"avatar_url":"https://avatars.githubusercontent.com/u/9287?v=3","gravatar_id":"","url":"https://api.github.com/users/isaacs","html_url":"https://github.com/isaacs","followers_url":"https://api.github.com/users/isaacs/followers","following_url":"https://api.github.com/users/isaacs/following{/other_user}","gists_url":"https://api.github.com/users/isaacs/gists{/gist_id}","starred_url":"https://api.github.com/users/isaacs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isaacs/subscriptions","organizations_url":"https://api.github.com/users/isaacs/orgs","repos_url":"https://api.github.com/users/isaacs/repos","events_url":"https://api.github.com/users/isaacs/events{/privacy}","received_events_url":"https://api.github.com/users/isaacs/received_events","type":"User","site_admin":false},"created_at":"2015-06-03T23:50:32Z","updated_at":"2015-06-03T23:50:32Z","body":"I'd be fine with just reverting it, but I worry that might cause new problems.\r\n\r\n@indutny or @bnoordhuis could weigh in on that."}}