Uh oh!
There was an error while loading. Please reload this page.
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.
rvagg
commented
May 9, 2016
I'm +1 on this, whatchy'all think @nodejs/addon-api & @nodejs/v8? |
jeisinger
commented
May 9, 2016
why not add a block 'variables': { instead of setting the macro directly? |
bnoordhuis
commented
May 9, 2016
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 |
bnoordhuis
commented
May 9, 2016
@jeisinger V8's *.gypi files aren't included when building add-ons, only node's common.gypi and config.gypi. |
jeisinger
commented
May 9, 2016
fair enough, +1 then to your proposal |
kkoopa
commented
May 9, 2016
-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. |
matthewloring
commented
May 9, 2016
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. |
matthewloring
commented
May 9, 2016
Addressing nan deprecations here: nodejs/nan#568 |
matthewloring
commented
May 12, 2016
nodejs/nan#568 and nodejs/nan#569 should clear up the nan deprecation warnings once they land. |
matthewloring
commented
May 29, 2016
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>
bnoordhuis
commented
May 30, 2016
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
rvagg
commented
Jul 13, 2016
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 |
bnoordhuis
commented
Jul 13, 2016
@rvagg No, the warning is emitted by a V8 patch that we're floating in node. |
rvagg
commented
Jul 13, 2016
@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.) |
ofrobots
commented
Jul 13, 2016
Note that this issue is about compile time deprecation warnings whereas #991 is a runtime warning. This doesn't print a stack trace. |
rvagg
commented
Jul 13, 2016
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.