Skip to content
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

Update nw-gyp to latest node-gyp 6.1.0 #136

Open
wants to merge 389 commits into
base: master
Choose a base branch
from

Conversation

surunzi
Copy link

@surunzi surunzi commented Mar 31, 2020

Manually tested a few native modules in both windows 7 and macOS Mojave with nw 0.44, looks ok.

bnoordhuis and others added 30 commits November 24, 2015 15:12
Fixes: nodejs#823
PR-URL: nodejs#824
Reviewed-By: Bert Belder <bertbelder@gmail.com>
* adds netbsd support: https://codereview.chromium.org/1421073004

* fixes cp(1) use on openbsd: https://codereview.chromium.org/1483473002

Fixes: nodejs#571
Fixes: nodejs#803
PR-URL: nodejs#831
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Move the function around so it can be tested and add a regression test.

As a policy vs. mechanism thing, change the control flow to handle
exceptions at the call site, not inside the download function.

PR-URL: nodejs#837
Reviewed-By: Rod Vagg <rod@vagg.org>
Add an option for overriding the default CA chain that is used when
downloading the tarball.  This matches the npm option of the same
name and gets implicitly passed through the `npm_config_cafile`
environment variable.

Fixes: nodejs#695
PR-URL: nodejs#837
Reviewed-By: Rod Vagg <rod@vagg.org>
Fixes: sass/node-sass#1334
PR-URL: nodejs#856
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
The breaking change introduced in npmlog 2.x was to anyone who was using the
log as an event emitter and was listening for error events. Since node-gyp
doesn't do these things, it isn't impacted by this change.

PR-URL: nodejs#861
Reviewed-By: Rod Vagg <rod@vagg.org>
Properly created -headers.tar.gz files were not available until
v0.12.10 and v0.10.42 (in addition to >= 3).

PR-URL: nodejs#877
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Deprecate NVM_NODEJS_ORG_MIRROR and NVM_IOJS_ORG_MIRROR as they
were only ever intended to be internal nvm environment variables.
These will be removed in the next semver-major release.

PR-URL: nodejs#878
Reviewed-By: ralphtheninja
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
When generating Android .mk files, ready to be used within Android build
system, we don't need LOCAL_SDK_VERSION specified, since the Android
build system already uses the latest one.
By specifying LOCAL_SDK_VERSION in Android makefiles, the build using
Android build system will fail, because the build system won't set the
path to stlport from prebuilts.

Signed-off-by: Robert Chiras <robert.chiras@intel.com>
PR-URL: nodejs#889
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
When looking for a Python executable on Windows, before falling back to
guessing the default location or failing completely, attempt to use the
Python launcher to figure out the location of the Python executable.

The Python launcher is being distributed by default with Python
distributions on Windows, and is placed in the %WINDIR% folder (which is
in the PATH). This allows us to locate a Python installation even if it
was installed without putting the python.exe executable itself into the
PATH.

Because the Python launcher supports all versions of Python, we have to
explicitly request a Python 2 version. This is done by supplying "-2" as
the first command line argument. Since "py.exe -2" would be an invalid
executable for "execFile", we have to use the launcher to figure out where
the actual "python.exe" executable is located.

PR-URL: nodejs#894
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Gyp defaults to gcc/g++ if CC.host/CXX.host is unset. This is not
suitable for environments that only uses the clang toolchain.

Since we already assume that the user will provide clang/clang++
through CC/CXX, lean against it (then drop to gcc/g++).

PR-URL: nodejs#908
Refs: nodejs/node#6173
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
* Point to the latest release of the VC++ Build Tools.
* Simplify and consolidate install instructions for all Windows versions.

PR-URL: nodejs#867
Fixes: nodejs#629
Reviewed-By: orangemocha - Alexis Campailla <orangemocha@nodejs.org>
Reviewed-By: thealphanerd - Myles Borins <myles.borins@gmail.com>
When generating Android.mk files for HOST binaries, we need to specify
the LOCAL_CXX_STL to use when linking.
Also, set the variable GYP_HOST_MULTILIB to 'first'. This is used as
LOCAL_MULTILIB, and since we don't provide flags for both types of
builds (32-bit and 64-bit), the build system will try to build both and
fail.
More details about LOCAL_MULTILIB can be found here:
https://source.android.com/source/64-bit-builds.html

Signed-off-by: Robert Chiras <robert.chiras@intel.com>
PR-URL: nodejs#935
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
It will be helpful for native module developers to be aware of any
deprecated apis they are using so that they can update before their
modules break completely. Module developers can override this option
in their binding.gyp if they do not want to see these warnings.

PR-URL: nodejs#920
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Matches what npm v2.15.5 and npm v3.8.6 use.

Fixes: nodejs#941
PR-URL: nodejs#943
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Passing --silent is equivalent to passing --loglevel=silent.

PR-URL: nodejs#937
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Documents options accepted by node-gyp.

PR-URL: nodejs#937
Refs: nodejs#880
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: nodejs#930
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
npmlog version 3 switches to gauge version 2.  The interface change is
in setGaugeTemplate, which node-gyp does not use.

PR-URL: nodejs#950
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Visual Studio 2015 Update 3 defines __pfnDliNotifyHook2 as const.
The decltype specifier makes the declaration work across all supported
versions of VS. It also requires that the source be compiled as C++.

Fixes: nodejs#949

PR-URL: nodejs#952
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: nodejs#953
Reviewed-By: Alexis Campailla <orangemocha@nodejs.org>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
We were inheriting BUILDING_UV_SHARED and BUILDING_V8_SHARED from
the common.gypi from the node.js source tree.  Override them with
USING_UV_SHARED and USING_V8_SHARED so symbols get tagged with
`__declspec(dllimport)` instead of `__declspec(dllexport)`, which
is the desired attribute when building add-ons.

Fixes: nodejs#914
PR-URL: nodejs#915
Reviewed-By: Benjamin Byholm <bbyholm@abo.fi>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
PR-URL: nodejs#958
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: nodejs#955
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
fs.accessSync does not exist in Node 0.10.x.

PR-URL: nodejs#955
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
gengjiawen and others added 26 commits October 30, 2019 21:25
PR-URL: nodejs#1944
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
PR-URL: nodejs#1947
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
PR-URL: nodejs#1925
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
PR-URL: nodejs#1940
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
PR-URL: nodejs#1935
Reviewed-By: João Reis <reis@janeasystems.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Christian Clauss <cclauss@me.com>
test/test-configure-python.js downloads a fresh set of headers to the
package directory each time. By setting to the default global cache dir
we get to re-use cached headers and skip the download step.

PR-URL: nodejs#1796
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
PR-URL: nodejs#1796
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
These steps have proven effective for some users.

PR-URL: nodejs#1962
Reviewed-By: Rod Vagg <rod@vagg.org>
PR-URL: nodejs#1961
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: João Reis <reis@janeasystems.com>
PR-URL: nodejs#1971
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
PR-URL: nodejs#1985
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Running Python standalone tests on multiple OSes would free up Travis CI for tests of various combinations of Node.js and Python as well as tests on other [CPU architectures](https://docs.travis-ci.com/user/multi-cpu-architectures).  __arch: amd64, arm64, ppc64le, s390x__

PR-URL: nodejs#1985
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Uses `pyenv` to manage MacOS python versions since its not included
in the environment.

rvagg: landing this from nodejs#1979 even though it wasn't from the original
author. Treating approval there as approval of this commit too.

PR-URL: nodejs#1979
Reviewed-By: Rod Vagg <rod@vagg.org>
Reorder Travis builds by OS. Replace `pyenv global` calls with
properly set `PATH` and `PYENV_VERSION` env vars. Does not
assume python modules are in the `PATH` so all python
modules are prefixed with `python -m`.

PR-URL: nodejs#1979
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
PR-URL: nodejs#1978
Reviewed-By: Rod Vagg <rod@vagg.org>
PR-URL: nodejs#2001
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
PR-URL: nodejs#1996
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
PR-URL: nodejs#1992
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
PR-URL: nodejs#1993
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
PR-URL: nodejs#1994
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Fixes nodejs#1998

Reviewed-By: Rod Vagg <rod@vagg.org>
PR-URL: nodejs#2009
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Christian Clauss <cclauss@me.com>
PR-URL: nodejs#2011
@KittenHero
Copy link

I hope this gets merged

@gpetrov
Copy link

gpetrov commented Apr 12, 2020

@rogerwang - could you check if this is all good? It will be really nice to be up to the latest node-gyp

@rogerwang
Copy link
Member

Thanks for the PR, but please rebase the nw-gyp patches to the new upstream version, rather than merging them into one commit.

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

Successfully merging this pull request may close these issues.