Closed
Description
- Version: v15.0.0-pre
- Platform: Linux 4.15.0-108-generic from here Friday yeah Soma guys and 20 from K yeah #109-Ubuntu SMP Fri Jun 19 11:33:10 UTC 2020 x86_64
- Subsystem: REPL
What steps will reproduce the bug?
- Run Node REPL.
- Choose your favorite global object.
- Type it into the REPL with the dot-style property accessor like so:
<global object>.
- Hit tab.
How often does it reproduce? Is there a required condition?
Always.
What is the expected behavior?
Deprecation warning is not shown.
What do you see instead?
Deprecation warning is shown.
./node --trace-deprecation
Welcome to Node.js v15.0.0-pre.
Type ".help" for more information.
> Array. /* hit tab */
Array.__defineGetter__ Array.__defineSetter__ Array.__lookupGetter__ Array.__lookupSetter__ Array.__proto__ Array.hasOwnProperty Array.isPrototypeOf
Array.propertyIsEnumerable Array.toLocaleString Array.valueOf
Array.apply Array.arguments Array.bind Array.call Array.caller Array.constructor Array.toString
Array.from Array.isArray Array.length Array.name Array.of Array.prototype
> Array.(node:13081) [DEP0097] DeprecationWarning: Using a domain property in MakeCallback is deprecated. Use the async_context variant of MakeCallback or the AsyncResource class instead.
at emitMakeCallbackDeprecation (domain.js:123:13)
at Connection.topLevelDomainCallback (domain.js:134:5)
at Connection.callbackTrampoline (internal/async_hooks.js:121:14)
at Session.post (inspector.js:118:28)
at internal/repl/utils.js:291:15
at sendInspectorCommand (internal/util/inspector.js:16:12)
at getInputPreview (internal/repl/utils.js:290:5)
at showPreview (internal/repl/utils.js:443:5)
at REPLServer.repl._refreshLine (internal/repl/utils.js:462:5)
at readline.js:567:10
Additional information
This warning is triggered in several other ways in REPL. For example certain function calls can trigger it:
> child_process.execFile('vim', [], {timeout: 1});
...
> (node:14593) [DEP0097] DeprecationWarning: Using a domain property in MakeCallback is deprecated. Use the async_context variant of MakeCallback or the AsyncResource class instead.
at emitMakeCallbackDeprecation (domain.js:123:13)
at Pipe.topLevelDomainCallback (domain.js:134:5)
at Pipe.callbackTrampoline (internal/async_hooks.js:121:14)
It makes me believe there is a common point for whole REPL that triggers this warning. I am eager to investigate further if provided with some clues (especially on how to debug asynchronous handling in the C++ part of node).