Skip to content

DEP0097 warning triggered in REPL. #34069

Closed
@mkrawczuk

Description

@mkrawczuk

What steps will reproduce the bug?

  1. Run Node REPL.
  2. Choose your favorite global object.
  3. Type it into the REPL with the dot-style property accessor like so: <global object>.
  4. 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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-bugIssues with confirmed bugs.replIssues and PRs related to the REPL subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions