{"action":"created","issue":{"url":"https://api.github.com/repos/Homebrew/homebrew/issues/36369","labels_url":"https://api.github.com/repos/Homebrew/homebrew/issues/36369/labels{/name}","comments_url":"https://api.github.com/repos/Homebrew/homebrew/issues/36369/comments","events_url":"https://api.github.com/repos/Homebrew/homebrew/issues/36369/events","html_url":"https://github.com/Homebrew/homebrew/pull/36369","id":55972075,"number":36369,"title":"Graduate iojs out of keg-only","user":{"login":"bcomnes","id":166301,"avatar_url":"https://avatars.githubusercontent.com/u/166301?v=3","gravatar_id":"","url":"https://api.github.com/users/bcomnes","html_url":"https://github.com/bcomnes","followers_url":"https://api.github.com/users/bcomnes/followers","following_url":"https://api.github.com/users/bcomnes/following{/other_user}","gists_url":"https://api.github.com/users/bcomnes/gists{/gist_id}","starred_url":"https://api.github.com/users/bcomnes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcomnes/subscriptions","organizations_url":"https://api.github.com/users/bcomnes/orgs","repos_url":"https://api.github.com/users/bcomnes/repos","events_url":"https://api.github.com/users/bcomnes/events{/privacy}","received_events_url":"https://api.github.com/users/bcomnes/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":31,"created_at":"2015-01-29T23:15:42Z","updated_at":"2015-05-05T03:14:24Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Homebrew/homebrew/pulls/36369","html_url":"https://github.com/Homebrew/homebrew/pull/36369","diff_url":"https://github.com/Homebrew/homebrew/pull/36369.diff","patch_url":"https://github.com/Homebrew/homebrew/pull/36369.patch"},"body":"This is an alternative to https://github.com/Homebrew/homebrew/pull/36343 that brings the following qualities:\r\n\r\n### This PR:\r\n- Graduates iojs out of keg-only\r\n- Conflicts iojs and node (this seems to be what the iojs team wants)\r\n- installs npm from the tarball every time node or iojs is installed.\r\n - No patching is performed. Don't merge until compatibility is reached.\r\n\r\n### Issues that still need resolution\r\n- [x] Move npm install code to `Library/Homebrew/language/javascript.rb` and share between node and iojs formula.  (Anyone feel free to hop in on this one!  I don't have time right now)\r\n- [ ] Wait for `node-gyp` patch to land \r\n\r\n### Why this arrangement works well\r\n- users can either brew install node OR brew install iojs and everything \"just works\".\r\n- the npm install is basically identical between the two ~~(except for the current patch)~~.\r\n- nuking the npm install during updates isn't a big deal.\r\n- npm can still update itself.\r\n- ~~npm updating itself wont break patch~~\r\n\r\n### Wackiness\r\n- ~~Massive DRY violation.  Can the `npm` install code be separated out somehow?~~\r\n- ~~Patching resources is a tad funky.  This would be cleaned up by https://github.com/Homebrew/homebrew/issues/31508#issuecomment-70918737~~\r\n- ~~Patching one formula but not the other breaks the linking/unlinking dance with both formula installed.~~  \r\n- npm installs on all node/iojs installs+updates and nukes whatever is in `/usr/local/lib/node_modules/npm`\r\n\r\n#### Current iojs formula discussions\r\n- ~~https://github.com/Homebrew/homebrew/pull/36357 Adds flag to patch npm install for iojs compatibility~~\r\n- ~~https://github.com/Homebrew/homebrew/pull/36343 Node, iojs and npm formula resolution~~\r\n- https://github.com/Homebrew/homebrew/pull/36369 Graduate iojs out of keg-only\r\n\r\n#### working iojs taps\r\n- https://github.com/aredridel/homebrew-iojs\r\n\r\n#### Past iojs formula discussions\r\n- https://github.com/Homebrew/homebrew/pull/35853\r\n- https://github.com/Homebrew/homebrew/pull/36039\r\n- https://github.com/Homebrew/homebrew/pull/36193\r\n\r\n####  npm formula issues:\r\n- https://github.com/Homebrew/homebrew/issues/3762\r\n- https://github.com/Homebrew/homebrew/issues/22408\r\n- https://github.com/Homebrew/homebrew/pull/27479\r\n- https://github.com/Homebrew/homebrew/pull/28075\r\n"},"comment":{"url":"https://api.github.com/repos/Homebrew/homebrew/issues/comments/98920689","html_url":"https://github.com/Homebrew/homebrew/pull/36369#issuecomment-98920689","issue_url":"https://api.github.com/repos/Homebrew/homebrew/issues/36369","id":98920689,"user":{"login":"bcomnes","id":166301,"avatar_url":"https://avatars.githubusercontent.com/u/166301?v=3","gravatar_id":"","url":"https://api.github.com/users/bcomnes","html_url":"https://github.com/bcomnes","followers_url":"https://api.github.com/users/bcomnes/followers","following_url":"https://api.github.com/users/bcomnes/following{/other_user}","gists_url":"https://api.github.com/users/bcomnes/gists{/gist_id}","starred_url":"https://api.github.com/users/bcomnes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcomnes/subscriptions","organizations_url":"https://api.github.com/users/bcomnes/orgs","repos_url":"https://api.github.com/users/bcomnes/repos","events_url":"https://api.github.com/users/bcomnes/events{/privacy}","received_events_url":"https://api.github.com/users/bcomnes/received_events","type":"User","site_admin":false},"created_at":"2015-05-05T03:14:24Z","updated_at":"2015-05-05T03:14:24Z","body":"I made a few more minor changes:\r\n\r\n- Replicated caveat changes from https://github.com/Homebrew/homebrew/commit/f2bfb09f278ad979560920a83bb022d0dd9a6133\r\n- De-duped caveats between iojs and node\r\n- De-duped npm url and sha265\r\n\r\nHappy to revert or change if there are any objections.  Feedback always welcome.\r\n\r\nAlso just to chime in on my experience over the last few weeks:\r\n\r\n```sh\r\n$ brew unlink node && brew link iojs --force \r\n$ npm i pangyp -g && npm config set node-gyp pangyp\r\n```\r\nhas been super stable (even when unlinking iojs re-linking node) and is caveat worthy imho.  Its been what I've been using personally and I'm pretty happy with it, since its been a set and forget experience.  This sets your `~/,npmrc` to use an alternative gyp that is aware of the proper header files depending on which node you are currently using.  Its the closest thing to a non-floating patch at this point: https://github.com/rvagg/pangyp"}}