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

deps: upgrade npm to 6.10.1 #28647

Closed
wants to merge 1 commit into from
Closed

deps: upgrade npm to 6.10.1 #28647

wants to merge 1 commit into from

Conversation

isaacs
Copy link
Contributor

@isaacs isaacs commented Jul 12, 2019

Full release notes: https://npm.community/t/release-npm-6-10-1/8790

Notable changes:

  • Fixes an EISDIR error in the cache
  • Adds support for Visual Studio 2019 by upgrading node-gyp to 5.0.2
  • Strip git environment variables when running git subcommands, so that
    running npm from within an existing git process does not get borked.

Full release notes: https://npm.community/t/release-npm-6-10-1/8790

Notable changes:

- Fixes an EISDIR error in the cache
- Adds support for Visual Studio 2019 by upgrading node-gyp to 5.0.2
- Strip git environment variables when running git subcommands, so that
  running npm from within an existing git process does not get borked.
@nodejs-github-bot nodejs-github-bot added the npm Issues and PRs related to the npm client dependency or the npm registry. label Jul 12, 2019
Copy link
Member

@Trott Trott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rubber-stamp LGTM

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot
Copy link
Collaborator

@Trott
Copy link
Member

Trott commented Jul 15, 2019

addon test failures on macOS are persistent. Many of the addon tests use stuff in deps/npm....

@richardlau
Copy link
Member

addon test failures on macOS are persistent. Many of the addon tests use stuff in deps/npm....

... and uses node-gyp, which was updated in this PR inside npm from version 3.8.0 to 5.0.2. Given that it's macOS only, the prime suspect would be nodejs/node-gyp@2761afb (nodejs/node-gyp#1689).

@joaocgreis
Copy link
Member

ARM64 Windows support landed as a floating patch in #28604. This PR already contains all of that, so this can simply overwrite what is currently in master.

@Trott
Copy link
Member

Trott commented Jul 15, 2019

addon test failures on macOS are persistent. Many of the addon tests use stuff in deps/npm....

... and uses node-gyp, which was updated in this PR inside npm from version 3.8.0 to 5.0.2. Given that it's macOS only, the prime suspect would be nodejs/node-gyp@2761afb (nodejs/node-gyp#1689).

^^^^ @bnoordhuis @nodejs/platform-macos @nodejs/node-gyp

@rvagg
Copy link
Member

rvagg commented Jul 16, 2019

Well the only thing that could be impacting it from those two commits is the addon.gypi changes: nodejs/node-gyp@2761afb#diff-df3ec83827f1a390820c4225e8cbcc9a
Someone want to try applying the reverse patch and running it through CI?

diff --git a/addon.gypi b/addon.gypi
index e8b95c5..e1c4b24 100644
--- a/addon.gypi
+++ b/addon.gypi
@@ -90,10 +90,14 @@

     'conditions': [
       [ 'OS=="mac"', {
+        'cflags': [
+          '-fvisibility=hidden'
+        ],
         'defines': [
           '_DARWIN_USE_64_BIT_INODE=1'
         ],
         'xcode_settings': {
+          'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
           'DYLIB_INSTALL_NAME_BASE': '@rpath'
         },
       }],

@bnoordhuis
Copy link
Member

It's the node-gyp change. Those add-on tests are actually defective but it slipped under the radar so far. The fix is trivial:

diff --git a/test/addons/dlopen-ping-pong/binding.cc b/test/addons/dlopen-ping-pong/binding.cc
index 6a6c297b52..8ad6a675b6 100644
--- a/test/addons/dlopen-ping-pong/binding.cc
+++ b/test/addons/dlopen-ping-pong/binding.cc
@@ -5,6 +5,7 @@
 
 #include <dlfcn.h>
 
+__attribute__((visibility("default")))
 extern "C" const char* dlopen_pong(void) {
   return "pong";
 }
diff --git a/test/addons/dlopen-ping-pong/ping.c b/test/addons/dlopen-ping-pong/ping.c
index bb0e6845d5..c76f40580c 100644
--- a/test/addons/dlopen-ping-pong/ping.c
+++ b/test/addons/dlopen-ping-pong/ping.c
@@ -2,6 +2,7 @@
 
 const char* dlopen_pong(void);
 
+__attribute__((visibility("default")))
 const char* dlopen_ping(void) {
   return dlopen_pong();
 }
diff --git a/test/addons/openssl-client-cert-engine/testengine.cc b/test/addons/openssl-client-cert-engine/testengine.cc
index 078695a056..b0acf23c06 100644
--- a/test/addons/openssl-client-cert-engine/testengine.cc
+++ b/test/addons/openssl-client-cert-engine/testengine.cc
@@ -19,6 +19,12 @@
 #define AGENT_KEY           "test/fixtures/keys/agent1-key.pem"
 #define AGENT_CERT          "test/fixtures/keys/agent1-cert.pem"
 
+#ifdef _WIN32
+# define DEFAULT_VISIBILITY
+#else
+# define DEFAULT_VISIBILITY __attribute__((visibility("default")))
+#endif
+
 namespace {
 
 int EngineInit(ENGINE* engine) {
@@ -93,8 +99,8 @@ int bind_fn(ENGINE* engine, const char* id) {
 }
 
 extern "C" {
-  IMPLEMENT_DYNAMIC_CHECK_FN();
-  IMPLEMENT_DYNAMIC_BIND_FN(bind_fn);
+  DEFAULT_VISIBILITY IMPLEMENT_DYNAMIC_CHECK_FN();
+  DEFAULT_VISIBILITY IMPLEMENT_DYNAMIC_BIND_FN(bind_fn);
 }
 
 }  // anonymous namespace

It does mean the new version of node-gyp might break third-party code that worked by accident before, and I suppose that means it has to be reverted because it landed in a patch release...

@rvagg
Copy link
Member

rvagg commented Jul 16, 2019

FWIW I submitted a job just after I posted that last comment with that patch undone and it's passing: https://ci.nodejs.org/job/node-test-commit/30143/

Let's get that revert done and a release out tomorrow.

@bnoordhuis will you take care of getting your patch into here so we can do that change in a node-gyp v6?

rvagg pushed a commit to nodejs/node-gyp that referenced this pull request Jul 17, 2019
This reverts commit 2761afb.

Building with `-fvisibility=hidden` breaks some of Node's add-on tests
and therefore likely also affects third-party add-ons. This change was
landed in a patch release so I'm opting to revert it until the next
major release.

PR-URL: #1828
Refs: nodejs/node#28647 (comment)
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Rod Vagg <[email protected]>
@rvagg
Copy link
Member

rvagg commented Jul 17, 2019

[email protected] is out and fixes this by reverting the change to addon.gypi, we'll push out a v6 sometime soon because we have at least one other semver-major queued.

For now, any thoughts on how to handle this? Do we wait for an new npm with it or do we patch it on top of 6.10.1 for this PR?

@bnoordhuis
Copy link
Member

Npm needs to do a new release anyway, otherwise people still get a broken install when they manually upgrade to 6.10.1.

@irega
Copy link

irega commented Jul 17, 2019

Npm needs to do a new release anyway, otherwise people still get a broken install when they manually upgrade to 6.10.1.

@bnoordhuis @rvagg I have started to update "npm-lifecycle" and "npm" with this PR. It is pending of approvement

@irega
Copy link

irega commented Jul 19, 2019

node-gyp 5.0.3 will be included in the next npm version (6.10.2). See 06772f3 made by @isaacs for more details

@irega
Copy link

irega commented Jul 24, 2019

npm version 6.10.2 was released by @isaacs should we create a new PR?

EDIT: PR created.

@isaacs
Copy link
Contributor Author

isaacs commented Jul 26, 2019

Closing in favor of #28853

@isaacs isaacs closed this Jul 26, 2019
@isaacs isaacs deleted the npm-v6.10.1 branch July 26, 2019 00:38
bnoordhuis added a commit to bnoordhuis/io.js that referenced this pull request Jan 12, 2020
Upcoming changes to node-gyp will turn on `-fvisibility=hidden` on
macOS. Ensure that public symbols that are dlsym'd have default
visibility.

Refs: nodejs#28647
Refs: nodejs/node-gyp#1828
Trott pushed a commit to Trott/io.js that referenced this pull request Jan 18, 2020
Upcoming changes to node-gyp will turn on `-fvisibility=hidden` on
macOS. Ensure that public symbols that are dlsym'd have default
visibility.

Refs: nodejs#28647
Refs: nodejs/node-gyp#1828

PR-URL: nodejs#28717
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
codebytere pushed a commit that referenced this pull request Feb 17, 2020
Upcoming changes to node-gyp will turn on `-fvisibility=hidden` on
macOS. Ensure that public symbols that are dlsym'd have default
visibility.

Refs: #28647
Refs: nodejs/node-gyp#1828

PR-URL: #28717
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
codebytere pushed a commit that referenced this pull request Mar 14, 2020
Upcoming changes to node-gyp will turn on `-fvisibility=hidden` on
macOS. Ensure that public symbols that are dlsym'd have default
visibility.

Refs: #28647
Refs: nodejs/node-gyp#1828

PR-URL: #28717
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
codebytere pushed a commit that referenced this pull request Mar 17, 2020
Upcoming changes to node-gyp will turn on `-fvisibility=hidden` on
macOS. Ensure that public symbols that are dlsym'd have default
visibility.

Refs: #28647
Refs: nodejs/node-gyp#1828

PR-URL: #28717
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
npm Issues and PRs related to the npm client dependency or the npm registry.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants