{"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":23,"created_at":"2015-06-03T19:01:31Z","updated_at":"2015-06-07T20:00:37Z","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/109793573","html_url":"https://github.com/nodejs/io.js/issues/1887#issuecomment-109793573","issue_url":"https://api.github.com/repos/nodejs/io.js/issues/1887","id":109793573,"user":{"login":"Fishrock123","id":1093990,"avatar_url":"https://avatars.githubusercontent.com/u/1093990?v=3","gravatar_id":"","url":"https://api.github.com/users/Fishrock123","html_url":"https://github.com/Fishrock123","followers_url":"https://api.github.com/users/Fishrock123/followers","following_url":"https://api.github.com/users/Fishrock123/following{/other_user}","gists_url":"https://api.github.com/users/Fishrock123/gists{/gist_id}","starred_url":"https://api.github.com/users/Fishrock123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fishrock123/subscriptions","organizations_url":"https://api.github.com/users/Fishrock123/orgs","repos_url":"https://api.github.com/users/Fishrock123/repos","events_url":"https://api.github.com/users/Fishrock123/events{/privacy}","received_events_url":"https://api.github.com/users/Fishrock123/received_events","type":"User","site_admin":false},"created_at":"2015-06-07T20:00:37Z","updated_at":"2015-06-07T20:00:37Z","body":"Using `node-gyp rebuild` on that just errors for me on OS X:\r\n\r\n```\r\n$ npm i\r\nnpm WARN package.json simple-binary-addon@1.0.0 No repository field.\r\nnpm WARN package.json simple-binary-addon@1.0.0 No README data\r\n\r\n> simple-binary-addon@1.0.0 install /Users/Jeremiah/Documents/simple\r\n> node-gyp rebuild\r\n\r\n  CXX(target) Release/obj.target/simple_addon/simple.o\r\n../simple.cc:15:15: error: calling a protected constructor of class\r\n      'v8::HandleScope'\r\n  HandleScope scope;\r\n              ^\r\n/Users/Jeremiah/.node-gyp/2.2.1/deps/v8/include/v8.h:869:13: note: declared\r\n      protected here\r\n  V8_INLINE HandleScope() {}\r\n            ^\r\n1 error generated.\r\nmake: *** [Release/obj.target/simple_addon/simple.o] Error 1\r\ngyp ERR! build error \r\ngyp ERR! stack Error: `make` failed with exit code: 2\r\ngyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)\r\ngyp ERR! stack     at emitTwo (events.js:87:13)\r\ngyp ERR! stack     at ChildProcess.emit (events.js:172:7)\r\ngyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:199:12)\r\ngyp ERR! System Darwin 14.3.0\r\ngyp ERR! command \"/usr/local/bin/iojs\" \"/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js\" \"rebuild\"\r\ngyp ERR! cwd /Users/Jeremiah/Documents/simple\r\ngyp ERR! node -v v2.2.1\r\ngyp ERR! node-gyp -v v1.0.3\r\ngyp ERR! not ok \r\n```"}}