On Thu, Jun 28, 2012 at 3:33 PM, Isaac Schlueter <[email protected]> wrote:

> > What CPAN does is always get the most recent, and if it fails because
> > of a reason like this (in Perl terms, the Makefile.PL has a "use
> <version>"
> > tag), it just fails. To get an older version you have to ask for that
> version
> > specifically. Would this not work here?
>
> That's basically what I'm proposing as the default.  Install the
> latest available, and if it breaks, oh well.  The "engines"
> restriction is thus an advisory warning.
>

Well I'm suggesting it checks if it breaks and requires you to do "npm
install --force" or something like that if you want to ignore the "engines"
flag.

That way you don't let things break at run time. You let the admin make a
decision. And you break at npm install time, which is how it should be.


> npm != CPAN.  In many ways, CPAN is better (mostly owing to many more
> years), but in others, npm is better (mostly owing to being invented
> in an era when CPAN already existed.)  "Just try the latest and then
> fail" is not exactly the npm way, and making npm behave exactly like
> CPAN would be a bit silly.
>

Of course I'm just suggesting things that work elsewhere in these scenarios
- not saying you should be the same as CPAN (though I do dream of one day
having something like the CPAN testers system).

> if (node version > package's "engines" tag), then don't track back to
> look for older versions.
>
> The problem is that it's a range, not a single value.


Ah, yeah didn't think that one through - thanks for the thorough
explanation - I was thinking of a single value.

Then what's wrong with npm just failing if "engines" doesn't match on the
latest version of the module? The user can then choose to install an
earlier version, or use --force.

Matt.

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to