Skip to content
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

v7.x: util: improve inspect for AsyncFunction #11211

Closed
wants to merge 2 commits into from

Conversation

targos
Copy link
Member

@targos targos commented Feb 7, 2017

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

util

This allows us to use async functions.
Use the constructor name in the output, if present.
This is a backport of nodejs#11210 without
the semver-major change to GeneratorFunction output.
@nodejs-github-bot nodejs-github-bot added util Issues and PRs related to the built-in util module. v7.x labels Feb 7, 2017
@targos targos changed the title util: improve inspect for AsyncFunction v7.x: util: improve inspect for AsyncFunction Feb 7, 2017
@hiroppy
Copy link
Member

hiroppy commented Feb 7, 2017

@TimothyGu
Copy link
Member

Sorry if this has been explained elsewhere, but is there a reason why the output for GeneratorFunction is kept as Function?

@addaleax
Copy link
Member

addaleax commented Feb 8, 2017

@TimothyGu Just trying to avoid breakage, that’s all.

I’d be okay with considering the full version, as in #11210, as a bugfix, but it might be better to be on the safe side here… we’ve definitely had reports of people checking util.inspect output in their tests. :/

Copy link
Member

@TimothyGu TimothyGu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@addaleax thanks for the explanation. LGTM as is.

jasnell pushed a commit that referenced this pull request Feb 13, 2017
This allows us to use async functions.

PR-URL: #11211
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
jasnell pushed a commit that referenced this pull request Feb 13, 2017
Use the constructor name in the output, if present.
This is a backport of #11210 without
the semver-major change to GeneratorFunction output.

PR-URL: #11211
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
@jasnell
Copy link
Member

jasnell commented Feb 13, 2017

Landed in ae30150...ac72c3e

@jasnell jasnell closed this Feb 13, 2017
italoacasas pushed a commit to italoacasas/node that referenced this pull request Feb 14, 2017
This allows us to use async functions.

PR-URL: nodejs#11211
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Feb 14, 2017
Use the constructor name in the output, if present.
This is a backport of nodejs#11210 without
the semver-major change to GeneratorFunction output.

PR-URL: nodejs#11211
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
@jasnell
Copy link
Member

jasnell commented Mar 7, 2017

Needs a backport PR to land in v6 and v4

@targos targos deleted the util-async-func-v7 branch June 1, 2017 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
util Issues and PRs related to the built-in util module.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants