-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Enable V8 deprecation warnings for native modules #920
Conversation
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.
I'm +1 on this, whatchy'all think @nodejs/addon-api & @nodejs/v8? |
why not add a block 'variables': { instead of setting the macro directly? |
I'm +1 too but I think it's important to first make sure that node v4-v6 (by which I mean node.h and friends) and nan are (Node.js is compiled with deprecation warnings enabled but that doesn't extend to files that aren't used by core itself, like |
@jeisinger V8's *.gypi files aren't included when building add-ons, only node's common.gypi and config.gypi. |
fair enough, +1 then to your proposal |
-1, it will unleash an endless stream of useless issues and headache on every level of the dependency chain. It is harder to find an addon that does not use deprecated APIs than one that does not. |
More issues should alert module authors to upgrade before things start breaking. This is especially important given how widespread the dependencies on deprecated APIs are. |
Addressing nan deprecations here: nodejs/nan#568 |
nodejs/nan#568 and nodejs/nan#569 should clear up the nan deprecation warnings once they land. |
nodejs/nan#568 and nodejs/nan#569 have landed and I didn't observe any deprecation warnings when compiling |
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: #920 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Landed in 15fd56b, thanks. There are one or two more PRs that I'd like to land before putting out a new release. |
Headline items: * Fix for Visual Studio 2015 __pfnDliNotifyHook2 failures nodejs/node-gyp#952 * Fix for AIX using fs.statSync nodejs/node-gyp#955 * More verbose msbuild.exe missing error output https://github.com/nodejs/node-gyp/pull/930/files * Added --silent for --loglevel=silent nodejs/node-gyp#937 * Enable V8 deprecation warnings for native addons nodejs/node-gyp#920 Full changelog at https://github.com/nodejs/node-gyp/blob/master/CHANGELOG.md Credit: @rvagg PR-URL: #13199 Reviewed-By: @zkat
Headline items: * Fix for Visual Studio 2015 __pfnDliNotifyHook2 failures nodejs/node-gyp#952 * Fix for AIX using fs.statSync nodejs/node-gyp#955 * More verbose msbuild.exe missing error output https://github.com/nodejs/node-gyp/pull/930/files * Added --silent for --loglevel=silent nodejs/node-gyp#937 * Enable V8 deprecation warnings for native addons nodejs/node-gyp#920 Full changelog at https://github.com/nodejs/node-gyp/blob/master/CHANGELOG.md Credit: @rvagg PR-URL: #13200 Reviewed-By: @zkat
Headline items: * Fix for Visual Studio 2015 __pfnDliNotifyHook2 failures nodejs/node-gyp#952 * Fix for AIX using fs.statSync nodejs/node-gyp#955 * More verbose msbuild.exe missing error output https://github.com/nodejs/node-gyp/pull/930/files * Added --silent for --loglevel=silent nodejs/node-gyp#937 * Enable V8 deprecation warnings for native addons nodejs/node-gyp#920 Full changelog at https://github.com/nodejs/node-gyp/blob/master/CHANGELOG.md Credit: @rvagg PR-URL: #13199 Reviewed-By: @zkat
Headline items: * Fix for Visual Studio 2015 __pfnDliNotifyHook2 failures nodejs/node-gyp#952 * Fix for AIX using fs.statSync nodejs/node-gyp#955 * More verbose msbuild.exe missing error output https://github.com/nodejs/node-gyp/pull/930/files * Added --silent for --loglevel=silent nodejs/node-gyp#937 * Enable V8 deprecation warnings for native addons nodejs/node-gyp#920 Full changelog at https://github.com/nodejs/node-gyp/blob/master/CHANGELOG.md Credit: @rvagg PR-URL: #13199 Reviewed-By: @zkat
Apparently this prints stack traces for users now, which is likely to get us (and addon authors) a lot of needless attention. e.g. #991 coming from:
in deps/v8/src/api.cc |
@rvagg No, the warning is emitted by a V8 patch that we're floating in node. |
@bnoordhuis is there a more minimal thing we can print cause looking at the output in #991 it's pretty dramatic. |
That's kind of the point. It's a strong incentive to update and it helps with finding the offending call site. If it just printed a warning without a stack trace, you wouldn't know from what dependency it originates. (I say this as someone who was less than amused by the flood of bogus bug reports he got about a deprecation warning in a dependency. Never again.) |
Note that this issue is about compile time deprecation warnings whereas #991 is a runtime warning. This doesn't print a stack trace. |
ok, I stand corrected, missed that one obviously! |
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.