-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Fix deprecation warning #8622
Comments
I tried to look into this and couldn't track down where it was coming from. Unless you can figure it out, I wonder if adding an "ignorable warnings" option to Rush would be the most practical path forward? |
Does anyone have some simple steps for reproing this warning? |
@ecraig12345, did you try invoking Reading nodejs/node#9516 (comment), the flag should output the stack trace. I haven't seen this warning myself with Edit: Nevermind, I got the warning with 29 of 37: [@uifabric/fabric-website-resources] completed successfully in 4 minutes 26.8 seconds
[ssr-tests] started
[a11y-tests] started
30 of 37: [a11y-tests] completed successfully in 22.36 seconds
(node:6220) [DEP0097] DeprecationWarning: Using a domain property in MakeCallback is deprecated. Use the async_context variant of MakeCallback or the AsyncResource class instead.
31 of 37: [@uifabric/experiments] completed successfully in 3 minutes 49.0 seconds Edit 2: I tried utilizing that flag in a few builds I suspected to be the culprit without luck. I tried the following packages: |
I tried
It didn't repro the second time I tried to build this project, even if I did The warning is reported directly from the By adding However @kenotron I can see that just-task is using undertaker, which uses async-done 1.3.1, which creates a domain on this line. Maybe the Webpack task is invoking this callback from a different domain. (?) |
It occurred to me that, since this problem is limited to just-task, a simpleminded workaround would be to add something this to the top of just.js: const originalEmitWarning = process.emitWarning;
process.emitWarning = function(warning, type, code, ctor) {
if (code === 'DEP0097') {
// Undertaker uses a deprecated approach that causes NodeJS 10 to print
// this warning to stderr:
//
// "Using a domain property in MakeCallback is deprecated. Use the async_context
// variant of MakeCallback or the AsyncResource class instead."
// Suppress the warning:
return;
}
originalEmitWarning(warning, type, code, ctor);
} It's a little hacky, but as far as I know NodeJS doesn't provide any other facility for fine-grained filtering of warnings. If you move the |
The text was updated successfully, but these errors were encountered: