Skip to content

domain: fix unintentional deprecation warning - #34245

Closed
addaleax wants to merge 2 commits into
nodejs:masterfrom
addaleax:domain-async-id-fixup
Closed

domain: fix unintentional deprecation warning#34245
addaleax wants to merge 2 commits into
nodejs:masterfrom
addaleax:domain-async-id-fixup

Conversation

@addaleax

@addaleaxaddaleax commented Jul 7, 2020

Copy link
Copy Markdown
Member

646e5a4 changed the way that the domain hook callback
is called. Previously, the callback was only used in the case that
async_hooks were not being used (since domains already integrate
with async hooks the way they should), and the corresponding
deprecation warning also only emitted in that case.

However, that commit didn’t move that condition along when the code
was ported from C++ to JS. As a consequence, the domain hook callback
was used when it wasn’t necessary to use it, and the deprecation
warning emitted accidentally along with it.

Refs: 646e5a4#diff-9f21ce1b9d6d46fdd07b969e8a04e140L192
Refs: 646e5a4#diff-e6db408e12db906ead6ddfac3de15a6fR119
Refs: #33801 (comment)
Fixes: #34069

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

646e5a4 changed the way that the domain hook callback
is called. Previously, the callback was only used in the case that
async_hooks were *not* being used (since domains already integrate
with async hooks the way they should), and the corresponding
deprecation warning also only emitted in that case.
However, that commit didn’t move that condition along when the code
was ported from C++ to JS. As a consequence, the domain hook callback
was used when it wasn’t necessary to use it, and the deprecation
warning emitted accidentally along with it.
Refs: nodejs@646e5a4#diff-9f21ce1b9d6d46fdd07b969e8a04e140L192
Refs: nodejs@646e5a4#diff-e6db408e12db906ead6ddfac3de15a6fR119
Refs: nodejs#33801 (comment)
@addaleax
addaleax requested a review from QardJuly 7, 2020 16:25
@nodejs-github-botnodejs-github-bot added the async_hooks Issues and PRs related to the async hooks subsystem. label Jul 7, 2020
@addaleaxaddaleax added the domain Issues and PRs related to the domain subsystem. label Jul 7, 2020
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@codebytere

Copy link
Copy Markdown
Member

Also closes #34069

@addaleax

Copy link
Copy Markdown
MemberAuthor

@codebytere Thanks, updated! :)

@addaleaxaddaleax added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jul 7, 2020
@addaleax

Copy link
Copy Markdown
MemberAuthor

👍 to fast-track? The change here is relatively straightforward.

@addaleaxaddaleax added the fast-track PRs that do not need to wait for 48 hours to land. label Jul 7, 2020
Comment threadlib/internal/async_hooks.js
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Qard
Qard approved these changes Jul 7, 2020
@Qard

Qard commented Jul 7, 2020

Copy link
Copy Markdown
Member

Sorry, thanks for catching this. :)

@addaleax

Copy link
Copy Markdown
MemberAuthor

Landed in 2243d79, thanks for the quick reviews!

@addaleaxaddaleax closed this Jul 7, 2020
addaleax added a commit that referenced this pull request Jul 7, 2020
646e5a4 changed the way that the domain hook callback
is called. Previously, the callback was only used in the case that
async_hooks were *not* being used (since domains already integrate
with async hooks the way they should), and the corresponding
deprecation warning also only emitted in that case.
However, that commit didn’t move that condition along when the code
was ported from C++ to JS. As a consequence, the domain hook callback
was used when it wasn’t necessary to use it, and the deprecation
warning emitted accidentally along with it.
Refs: 646e5a4#diff-9f21ce1b9d6d46fdd07b969e8a04e140L192
Refs: 646e5a4#diff-e6db408e12db906ead6ddfac3de15a6fR119
Refs: #33801 (comment)
PR-URL: #34245Fixes: #34069
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
@addaleax
addaleax deleted the domain-async-id-fixup branch July 7, 2020 20:08
@Flarna

Copy link
Copy Markdown
Member

I think we should get this one into v12.x-staging soon as #33801 has been included there.

@FlarnaFlarna mentioned this pull request Jul 14, 2020
MylesBorins pushed a commit that referenced this pull request Jul 14, 2020
646e5a4 changed the way that the domain hook callback
is called. Previously, the callback was only used in the case that
async_hooks were *not* being used (since domains already integrate
with async hooks the way they should), and the corresponding
deprecation warning also only emitted in that case.
However, that commit didn’t move that condition along when the code
was ported from C++ to JS. As a consequence, the domain hook callback
was used when it wasn’t necessary to use it, and the deprecation
warning emitted accidentally along with it.
Refs: 646e5a4#diff-9f21ce1b9d6d46fdd07b969e8a04e140L192
Refs: 646e5a4#diff-e6db408e12db906ead6ddfac3de15a6fR119
Refs: #33801 (comment)
PR-URL: #34245Fixes: #34069
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
codebytere pushed a commit that referenced this pull request Jul 14, 2020
646e5a4 changed the way that the domain hook callback
is called. Previously, the callback was only used in the case that
async_hooks were *not* being used (since domains already integrate
with async hooks the way they should), and the corresponding
deprecation warning also only emitted in that case.
However, that commit didn’t move that condition along when the code
was ported from C++ to JS. As a consequence, the domain hook callback
was used when it wasn’t necessary to use it, and the deprecation
warning emitted accidentally along with it.
Refs: 646e5a4#diff-9f21ce1b9d6d46fdd07b969e8a04e140L192
Refs: 646e5a4#diff-e6db408e12db906ead6ddfac3de15a6fR119
Refs: #33801 (comment)
PR-URL: #34245Fixes: #34069
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
@MylesBorinsMylesBorins mentioned this pull request Jul 14, 2020
MylesBorins pushed a commit that referenced this pull request Jul 16, 2020
646e5a4 changed the way that the domain hook callback
is called. Previously, the callback was only used in the case that
async_hooks were *not* being used (since domains already integrate
with async hooks the way they should), and the corresponding
deprecation warning also only emitted in that case.
However, that commit didn’t move that condition along when the code
was ported from C++ to JS. As a consequence, the domain hook callback
was used when it wasn’t necessary to use it, and the deprecation
warning emitted accidentally along with it.
Refs: 646e5a4#diff-9f21ce1b9d6d46fdd07b969e8a04e140L192
Refs: 646e5a4#diff-e6db408e12db906ead6ddfac3de15a6fR119
Refs: #33801 (comment)
PR-URL: #34245Fixes: #34069
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
codebytere pushed a commit to codebytere/node that referenced this pull request Jul 21, 2020
646e5a4 changed the way that the domain hook callback
is called. Previously, the callback was only used in the case that
async_hooks were *not* being used (since domains already integrate
with async hooks the way they should), and the corresponding
deprecation warning also only emitted in that case.
However, that commit didn’t move that condition along when the code
was ported from C++ to JS. As a consequence, the domain hook callback
was used when it wasn’t necessary to use it, and the deprecation
warning emitted accidentally along with it.
Refs: nodejs@646e5a4#diff-9f21ce1b9d6d46fdd07b969e8a04e140L192
Refs: nodejs@646e5a4#diff-e6db408e12db906ead6ddfac3de15a6fR119
Refs: nodejs#33801 (comment)
PR-URL: nodejs#34245Fixes: nodejs#34069
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

async_hooksIssues and PRs related to the async hooks subsystem.author readyPRs that have at least one approval, no pending requests for changes, and a CI started.domainIssues and PRs related to the domain subsystem.fast-trackPRs that do not need to wait for 48 hours to land.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DEP0097 warning triggered in REPL.

9 participants

@addaleax@nodejs-github-bot@codebytere@Qard@Flarna@jasnell@devsnek@vdeturckheim@puzpuzpuz