mafintosh / mafintosh/node-gyp-install
Changes to node-gyp post v3
- Dominant language
- JavaScript
- Stars
- 43
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
_Copied straight from https://github.com/Level/leveldown/issues/218#issuecomment-137942807_
Hey @ralphtheninja & @mafintosh, something to be aware of is that you'll need a double check because it can now be in an alternate location: https://github.com/rvagg/node-gyp/blob/process.release/lib/configure.js#L305-L309
Going forward, node-gyp will be downloading a headers-only tarball and it'll unpack most of its contents into the .node-gyp directory like so: ~/.node-gyp/version/include/node/ like a normal set of header files should. But this means that common.gypi will be in there as well. We've been shipping header tarballs since `3.0.0`. Of course for versions `<3.0.0` it'll still want the full source tarball.
Another factor for node-gyp-install is that node-gyp will be prefixing the versioned directories `iojs` with `iojs-`, then anything with `process.release.name != 'node'` will also be prefixed with whatever `process.release.name` is. At the moment a simple rule would be if `process.version` `>= 1.0.0 <4.0.0` then the directory will be `iojs-x.y.z`.
Complicating this however is that the node-gyp we've shipped with previous io.js versions will just stick them in `x.y.z` and use them from there, and all standard versions of node-gyp prior to now will just look them up by `process.version` which is why node-gyp-install can work.
We've released 4.0.0 RC 1 ([here](https://nodejs.org/download/rc/v4.0.0-rc.1/) with a bundled version of node-gyp that is not what you get with npm, like we've done with io.js in the past and v4.0.0 proper will also do the same. _But_, we'll be releasing a 3.0.0 of node-gyp as soon as the RC testing gives us confidence that it's doing the right thing and npm@2 will likely start bundling it shortly after that and it'll become standard(ish).
Food for thought, sorry for the complexity but it's for the best, honest .. Hit me up if you have any quesitons.
Also /cc @springmeyer: this context might be interesting for you too.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the linked node-gyp configure.js reference and compare its header and common.gypi locations with the behavior described for node-gyp-install. Done means determining how post-3.0.0 header tarballs, older source tarballs, and versioned io.js or non-Node directories should be handled, while preserving compatibility with earlier layouts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100