-
Notifications
You must be signed in to change notification settings - Fork 30.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nightly builds don't work with npm packages that specify minimum node version #2223
Comments
cc @isaacs any idea what's up here since you maintain |
|
Could be related to https://github.com/npm/node-semver#prerelease-tags.
|
@pornel Have you enabled the engine-strict option in your npm config ? AFAIK without it you should just get a warning. |
Was able to reproduce it, and can confirm that the change from |
Or rather, scrap that. I was testing the latest release. [email protected] still has an npm config set node-version 2.3.5 |
Working as designed. "Pre-release" versions are assumed invalid for meeting ranges unless you specify a prerelease version of the same (major,minor,patch) tuple in the range itself. This is to prevent users from surprisingly receiving a broken thing without opting into perhaps getting not-fully-baked stuff.
Manually setting the |
WOOHOO! That's all. |
Sure when installing things, but it's a little different for node core which the user would have had to explicitly install, isn't it? At least it won't error anymore, but doesn't it still log lots of warnings? Seems great for the rest of npm but maybe not so much for |
Yeah, those warnings are annoying, you usually get a few screens full of them on packages with big dependency trees. |
Note also that we're going to be seeing more use of nightlies and RCs as we enable proper node-gyp support for them, that's been one of the biggest hassles. As long as the errors are gone I'm fine with the errors for now but would expect over time that this is annoying for enough people that it needs to change. I don't believe the current behaviour of semver ranges wrt prerelease tags makes sense when applied Node versions but am happy to let that discussion play out over the long run. |
This makes testing RC builds of 4.0.0 a lot harder than it would need to be. E.g. we have multiple internal packages that specify Is the only option right now to run P.S.: It also seems to be possible to circumvent the engine check via |
this is out of our hands except that we'd like to make non-release builds more accessible and more commonly used which will in turn put pressure on npm to do something a bit more reasonable about this |
Crossposted from krakenjs/lusca#47 (comment) According to the SemVer specification, prerelease versions are not to be used by general public, and are considered "unstable", carrying a higher than normal risk of unintended breaking changes. In particular, they may be missing features that are expected to exist in the official release, so even very broad ranges are liable to violate expectations if prerelease versions match. In consideration of this, the When there is an official In the fast and furious world of small module authorship, this restriction is important and necessary in practice. However, since Node moves much more deliberately, and is extremely conservative with respect to API change, so the restriction feels overly cautious. Engines are not like normal dependencies. That is the reason why npm v3 removed the author-specified |
Okay, given node v5 shipping with npm v3 (assumption), this should only be an issue for the next couple of days / at most weeks until 4.0 ships. So as long as P.S.: I'm assuming that upgrading to npm v3 isn't an option right now because node-gyp will break. |
If by v5, you mean v4, I believe the plan is still to ship with the 2.x npm line. |
@izs this will get interesting once we have Fwiw, those will be stable enough to use without native modules, and I suspect a good deal of tooling-usage people will want to use them. And we'll probably even like, encourage it, more or less. I'd personally like if npm wouldn't spew warnings when used with cc @domenic too, since I figure he / google probably plan(s) on using these. |
This interpretation of the semver spec is taking some liberties, all the spec actually has to say about pre-releases is:
The spec is more concerned with precedence than the notion of "unstable" and what it might mean. So a minor tangent:
|
@Fishrock123 we're mostly just disappointed that the up-to-date V8 releases are getting shunted into prerelease space, which as @isaacs points out is not meant for general use. From our point of view it's the outdated ("stable") releases that should not be used, and the "prereleases" (up-to-date versions) should be used exclusively. |
This is just not how reality works. :/ |
indeed, give us a stable ABI and we may play to the same tune |
Also we could patch node-semver in the version npm with ship with if this causes people too many problems. (I hope this isn't hostile :s) |
I don't think patching npm in node is a good idea unless necessary (as was before node-gyp started to play nice with io.js etc.). This is just going to be extremely surprising that behavior changes when you update npm, even if you later downgrade to the "same" version that's included in Node. |
I guess this is because
npm
doesn't understand versions such as "2.3.5-nightly20150715f95f9ef6ea". The problem does not occur in iojs release version.The text was updated successfully, but these errors were encountered: