Skip to content

errors,stream-transform: migrate to use internal/errors.js - #13310

Closed
sreepurnajasti wants to merge 1 commit into
nodejs:masterfrom
sreepurnajasti:stream-transform
Closed

errors,stream-transform: migrate to use internal/errors.js#13310
sreepurnajasti wants to merge 1 commit into
nodejs:masterfrom
sreepurnajasti:stream-transform

Conversation

@sreepurnajasti

Copy link
Copy Markdown
Contributor
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

lib/_stream_transform.js

ref: #11273

@nodejs-github-botnodejs-github-bot added errors Issues and PRs related to JavaScript errors originated in Node.js core. stream Issues and PRs related to the stream subsystem. labels May 30, 2017
Comment threadlib/_stream_transform.js Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

'Calling transform done when still transforming' [](start = 27, length = 48)

don't need this anymore?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

@kunalspathak Thanks. It's done.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[](start = 22, length = 1)

nit: can you move the space on above line?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Comment threadlib/internal/errors.js Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If I recall correctly, there are a couple of places in core with a similar error. A more generic error message may be appropriate.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

@jasnell Modified the error message to be more generic. Thanks

@kunalspathak

Copy link
Copy Markdown
Member

@sreepurnajasti - Changes incorporated from my feedback looks good although I kind of don't like ERR_CALLING_WS_LENGTH as the reader doesn't easily get the intent of the error message. I will leave it to @jasnell to comment on this.

Comment threadlib/_stream_transform.js Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'd agree a better name for the error would be good. Maybe 'ERR_TRANSFORM_WITH_LENGTH_0'.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Comment threadlib/_stream_transform.js Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe to be consistent with my other suggestion:
'ERR_TRANSFORM_MULTIPLE_CALLBACK'.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

@mhdawson Fixed.

Comment threadlib/_stream_transform.js Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe to be consistent with my other suggestion:
'ERR_TRANSFORM_ALREADY_TRANSFORMING' String is already specific to transform so making that part of the ID makes sense to me.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

@sreepurnajasti

Copy link
Copy Markdown
ContributorAuthor

@mhdawson@jasnell As per the suggestions, it is modified. Please, have a look.

@jasnelljasnell added the semver-major PRs that contain breaking changes and should be released in the next major version. label Jun 13, 2017
@sreepurnajasti
sreepurnajastiforce-pushed the stream-transform branch 2 times, most recently from 47ada2c to 0cc5f2dCompareJune 14, 2017 14:28
@mhdawson

Copy link
Copy Markdown
Member

@mhdawson

Copy link
Copy Markdown
Member

CI good landing

@mhdawson

Copy link
Copy Markdown
Member

Landed as d50a802

mhdawson pushed a commit that referenced this pull request Jun 15, 2017
PR-URL: #13310
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
@sreepurnajasti

Copy link
Copy Markdown
ContributorAuthor

@mhdawson Thank you :)

@mcollina

Copy link
Copy Markdown
Member

I'm strongly -1 on this one. This forces some good rework on readable-stream to pull those error data. May I ask for a revert?

cc @nodejs/streams

@mcollina

Copy link
Copy Markdown
Member

To be clear, this is something we should be doing asap, but we need to think a bit how we want to do it.

@jasnell

Copy link
Copy Markdown
Member

:-/ ... reverting would be unfortunate. Perhaps instead, since this is semver-major and won't go out in a release any time soon, can we take a short bit of time to figure out the strategy for readable-stream? And if we can't identify a reasonable path forward, then revert...

@mcollina

Copy link
Copy Markdown
Member

That's ok for me, there is no hurry to revert.

@sreepurnajasti
sreepurnajasti deleted the stream-transform branch December 27, 2017 06:36
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

errorsIssues and PRs related to JavaScript errors originated in Node.js core.semver-majorPRs that contain breaking changes and should be released in the next major version.streamIssues and PRs related to the stream subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants

@sreepurnajasti@kunalspathak@mhdawson@mcollina@jasnell@refack@TimothyGu@nodejs-github-bot