Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Update node to 0.6.3 #8784

Closed
wants to merge 1 commit into from
Closed

Update node to 0.6.3 #8784

wants to merge 1 commit into from

Conversation

jearles
Copy link
Contributor

@jearles jearles commented Nov 25, 2011

I updated node to 0.6.3. from 0.6.2

I updated node to 0.6.3. from 0.6.2
@bradleyg
Copy link

Not sure it's as simple this time. NPM is now also installed on "make install" and I remember a bit of a debate whether NPM (already a package manager) should be available within homebrew at all.

@adamv
Copy link
Contributor

adamv commented Nov 25, 2011

So between 0.6.2 and 0.6.3, NPM was added to node-core?

@adamv
Copy link
Contributor

adamv commented Nov 25, 2011

Apparently so: nodejs/node-v0.x-archive@b159c6d#ChangeLog

@Sharpie
Copy link
Contributor

Sharpie commented Nov 25, 2011

Hmmm.... Is there a configure option to disable NPM?

@jearles
Copy link
Contributor Author

jearles commented Nov 25, 2011

http://groups.google.com/group/nodejs/browse_thread/thread/d592e5f194588aa7

Sounds like there might be a 0.6.4 soon anyway, and there have been a few grumblings about the "forced install" of npm. Hopefully they will add a way to disable, or optionally install.

Sorry for the trouble, but at least we have this issue to document the problem.

@Sharpie
Copy link
Contributor

Sharpie commented Nov 25, 2011

@isaacs

What do you recommend here? Last time we installed NPM via Homebrew it resulted in a lot of bug reports for you.

@jacknagel jacknagel mentioned this pull request Nov 25, 2011
@jearles
Copy link
Contributor Author

jearles commented Nov 26, 2011

Based on the latest comments to the Google Groups thread above it sounds like a 'no npm' install option will be added in the next release.

You may either close this pull request or leave it open (for higher visibility until the fix is available) at your discretion.

@MSch
Copy link
Contributor

MSch commented Nov 26, 2011

Will there be an option to install node including npm via homebrew? I'd rather install node via homebrew than via .pkg

Also, I'm curious, what's the reason for not installing npm by default?

@jacknagel
Copy link
Contributor

#3762

@Sharpie
Copy link
Contributor

Sharpie commented Nov 27, 2011

In the Google groups thread there is a reply from someone saying that MacPorts has a patch that disables the NPM install. If someone wants to rebase this to use their patch, we could pull it.

@adamv
Copy link
Contributor

adamv commented Nov 27, 2011

@jearles
Copy link
Contributor Author

jearles commented Nov 27, 2011

What about doing this:

  def install
    inreplace 'wscript' do |s|
      ...

      # v0.6.3 installs npm; disable that line
      s.sub! 'install_npm(bld)', 'print("Homebrew is skipping npm install")'
    end
    ...
  end

We could also add another caveat as the print doesn't get piped to console during brew install.

@gudmundur
Copy link

Why is having npm bundled and installed along with node a bad thing?

@Sharpie
Copy link
Contributor

Sharpie commented Nov 28, 2011

Why is having npm bundled and installed along with node a bad thing?

We used to have a NPM formula, but it caused a lot of problems for Homebrew and NPM---primarily because NPM takes responsibility for its own upgrades. This means that Homebrew and NPM spend too much time fighting each other to be worth the trouble caused to both projects and their users.

After much discussion with Isaac Schlueter, the NPM project lead, we decided to pull NPM from Homebrew. Since NPM is still self-upgrading, having it come back piggybacked on a Node install would just bring old skeletons out of the closet.

See issue #3762 for full details.

@curvedmark
Copy link

Just wondering, do we have the same problem with ruby (which installs gem)?

@Sharpie
Copy link
Contributor

Sharpie commented Nov 28, 2011

Just wondering, do we have the same problem with ruby (which installs gem)?

As far as I remember, Gem doesn't assert responsibility for its self to the same degree that NPM does. For example, NPM handles its own uninstallation and Isaac was getting a lot of bug reports concerning brew uninstall npm vs. npm uninstall npm vs. what his documentation said should happen, etc.

In the end, Isaac made the call to pull NPM from Homebrew in #4223 and we will respect his wishes until he advises otherwise. We could keep busy with "what about gem/pip/cpan/cabal/..." discussions all week, but the deciding factor in this discussion is that the maintainer of NPM doesn't think NPM belongs in Homebrew and we agree with him.

@adamv
Copy link
Contributor

adamv commented Nov 28, 2011

Note that Ruby (for gems) and Python (for pip) formulae go through some hoops to set paths correctly. At least on the Python side the set up is kind of touchy.

@isaacs
Copy link
Contributor

isaacs commented Nov 28, 2011

In the end, Isaac made the call to pull NPM from Homebrew

Actually, I made that call at the beginning. It was @mxcl who made the call in the end to remove it; I just agreed with him :)

There are two things that are important to consider here. I think we don't have to do anything particularly crazy or drastic with the node recipe to make everyone happy. We can probably even let it install npm, and perhaps allow it to self-update. Maybe an npm recipe could be revisited, even.

  1. npm now supports a built-in npmrc file, which is "sticky" whenever it installs another version of npm globally. So, any configuration option that needs to be set can be set via ./configure at install time (or just manually write the ini-formatted file at path/to/npm/source/npmrc), which removes the need for homebrew to regex the source code or disable global installs. Just have it use a different global prefix, tell the user to update their PATH accordingly, and be done with it.
  2. We're going to add a no-npm option to node very soon. Most likely this will be either a make install-node or a ./configure --without-npm step in node's build process. So, if you'd rather JUST install node, and not npm, then that will be easy to accomplish. Follow the action at build: add 'no npm' install target nodejs/node-v0.x-archive#2200

This way, npm could install stuff into /usr/local/npm/<blah>, and if the user puts /usr/local/npm/bin into their PATH, then they'll be able to self-update. If they do npm install npm -g, then it'll put a new version in prefix/npm/bin, and leave the homebrew-installed one alone, etc.

The big blocker last time was that npm was so young, and updating quickly. However, things are getting more and more stable as we move forward. I suspect that some time this year, npm will be more or less finished. The big hurdle was getting onto a javascript tar implementation, and that's coming along nicely.

Since I'm going to end up seeing bug reports for npm regardless of how it's installed, I'd greatly appreciate the ability to review any npm recipe to make sure it doesn't revive any skeletons ;)

@isaacs
Copy link
Contributor

isaacs commented Nov 30, 2011

Related: nodejs/node-v0.x-archive@3ca0517

There is now a --without-npm configure option. I do think it would probably be best to explore an npm recipe some time soon, but as a separate thing.

@jearles
Copy link
Contributor Author

jearles commented Dec 2, 2011

0.6.4 has landed. I've created a new pull request.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants