Skip to content

node-gyp: temporary fixes to support nightlies & rc builds, download header tarball only

Rodrigo Muino Tomonari requested to merge github/fork/rvagg/node-gyp-hack into next

I'd like to get these two commits on to next as a _temporary_ measure to:

make node-gyp aware of nightly, next-nightly and rc binaries and download the files from the right locations for these.

Primarily I'd like this so that nightlies and rc builds become actually useful to people so we can get testers. Also we can make a better case for getting a new NAN released if the RC builds for 3.0 will actually use it without any hackery.

Ultimately I need to get the process.release work finished and the additional node-gyp changes which would nullify the need for this change completely but getting that through the node-gyp -> npm -> io.js process is going to take a while. When that's all done we can stop floating all of these patches.

make node-gyp only download the new headers tarball that we are producing, it's under 200k and has everything needed for most cases.

These header tarballs are in the same format as the headers that ship with the binary tarballs and installers (except windows) and the ideal has been for node-gyp to be aware of platform headers and use them where it makes sense to avoid downloading all together. So far nobody has done that work and even when it's done we'll still need the ability to download headers (for multiple reasons).

The catch here is that the headers tarball format does not match the source tarball format. There is a change in addon.gypi to accommodate this change in a backward-compatible way (adds include/node to the includes path, the existing ones become redundant when using the headers tarball). This is OK for most uses, BUT where addons are using header files that don't belong to Node, V8 or libuv then we get into a sticky situation. The only usage of that type that I'm aware of in the ecosystem is addons using the bundled openssl. bignum is probably the most popular addon that uses this technique. We'd just need get authors to add backward-compatible fixes to these to make them work (I have publish rights to bignum so that's easy). IMO, we may as well get this over and done with in 3.0 because we're probably going to have to do it some time.

/cc @nodejs/build @othiym23 @TooTallNate

Merge request reports

Loading