-
-
Notifications
You must be signed in to change notification settings - Fork 11.3k
Node, iojs and npm formula resolution #36343
Conversation
This patch is comptatable with with joyent node and iojs node: http://logs.libuv.org/npm/2015-01-28#21:53:34.823
Basically both just need a
Yeh, that's my main objection to this. We don't really support this model and it doesn't really fit with other similar packages. If we can work out a way that node and iojs wouldn't hate then having |
I got a bit of tunnel vision working on this last night. I have another idea that might work well, I'll send a parallel PR to this later. I'll research |
Symlinking |
Wow. That wackiness actually sounds like a good status quo to me. If I tell either brew or npm to do something, it does it. |
@aredridel It does leave the possibility for one system or the other to leave a bunch of symlinks in the way of the other, resulting in the need to run a |
I back-ported patch changes that I learned from this PR to the existing formula: #36357 |
Closing in favor of #36369 for now. |
I'm aware of the historical baggage of a separate
npm
formula, but I think the introduction ofiojs
warrants at least revisiting this solution taking into what has been learned from the current node formula. I appreciate your consideration in advance. If this is just too wacky, I understand, but I believe its a step forward.This PR:
npm
into its own formulanpm
compatible withiojs
.node
: http://logs.libuv.org/npm/2015-01-28#21:53:34.823#{HOMEBREW_PREFIX}
, replicating existingnpm
tarball install behavior. (this part is key)npm
installing modules into#{HOMEBREW_PREFIX}/lib/node_modules
which then link to#{HOMEBREW_PREFIX}/bin
iojs
out of its keg-only statusiojs
withnode
, so they can't be linked at the same time.brew
users can unlink and link in and out the version they want, if the choose to have both built at the same time.Issues that still need resolution:
npm
formula should depend onnode
ORiojs
. Right now, it only depends onnode
. I don't know how to do this. Can someone help me wrangleLibrary/Homebrew/requirements.rb
to enable this?[ ] Neitheriojs
ornode
"depend" onnpm
. But it should probably be installed automatically with these unless told not to. Is there a way to do that? Right now I just added a caveat instructing people tobrew install npm
.Why this arrangement works well
brew install node
ORbrew install iojs
and everything "just works". I believe this will resolve the recent pushback related toiojs
formula as this puts the two projects on equal footing.npm
can be installed and patched according to the needs of homebrew and a dependency chain can be enforced.npm
modules, and these stay out of the way of homebrew'snpm
cellar.npm
is free to update itself (egnpm install -g npm@latest
ornpm install -g npm@next
) and it works as well as it should.npm
updates itself.brew
can updatenpm
and it works the way one would expect.Wackiness
npm
withnpm
installs a second copy ofnpm
into#{HOMEBREW_PREFIX}/lib/node_modules
.brew update npm
ornpm install -g npm@latest
) is run last will take precedence over which version ofnpm
is used. Users can also usebrew unlink npm && brew link npm
to put brews npm back in place.npm
withnpm
would undo thenpm
patch applied bybrew
. In the future, this wont be such a big issue as thenpm
devs are committed to keeping compatibility betweeniojs
andnode
patches won't be needed.As both a
homebrew
user and anode
user, I don't find this wackiness to be unreasonable.Current iojs formula discussions
working iojs taps
Past iojs formula discussions
npm formula issues:
Extra thanks for all the info and help from @othiym23, @mistydemeo, @DomT4, @rvagg, @aredridel and @MikeMcQuaid