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

Update stream.md - fix issue in setEncoding method #11363

Closed
wants to merge 1 commit into
base: master
from

Conversation

@RickBullotta
Contributor

RickBullotta commented Feb 14, 2017

Removed an incorrect reference to the use of setEncoding(null) as the proper way to handling binary streams or to disable encoding, and explained that the default encoding is "no encoding", and that this is the correct approach for dealing with binary data via Buffers.

Checklist
  • documentation is changed or added
Affected core subsystem(s)

Affects documentation only

Update stream.md - fix issue in setEncoding method
Removed an incorrect reference to the use of setEncoding(null) as the proper way to handling binary streams or to disable encoding, and explained that the default encoding is "no encoding", and that this is the correct approach for dealing with binary data via Buffers.
The `readable.setEncoding()` method sets the default character encoding for
data read from the Readable stream.
The `readable.setEncoding()` method sets the character encoding for
data read from the Readable stream.

This comment has been minimized.

@mscdex

mscdex Feb 14, 2017

Contributor

Trailing space should be removed.

@mscdex

mscdex Feb 14, 2017

Contributor

Trailing space should be removed.

Setting an encoding causes the stream data
By default, no encoding is assigned and stream data will be returned as
Buffer objects. Setting an encoding causes the stream data

This comment has been minimized.

@mscdex

mscdex Feb 14, 2017

Contributor

Double space after the period should be a single space (IMHO and to match the surrounding text).

@mscdex

mscdex Feb 14, 2017

Contributor

Double space after the period should be a single space (IMHO and to match the surrounding text).

Setting an encoding causes the stream data
By default, no encoding is assigned and stream data will be returned as
Buffer objects. Setting an encoding causes the stream data
to be returned as string of the specified encoding rather than as `Buffer`

This comment has been minimized.

@mscdex

mscdex Feb 14, 2017

Contributor

Can you add an 'a' before 'string' here too?

@mscdex

mscdex Feb 14, 2017

Contributor

Can you add an 'a' before 'string' here too?

This comment has been minimized.

@mscdex

mscdex Feb 14, 2017

Contributor

and before `Buffer`

@mscdex

mscdex Feb 14, 2017

Contributor

and before `Buffer`

This comment has been minimized.

@gibfahn

gibfahn May 19, 2017

Member

Can you add an 'a' before 'string' here too?

Went with strings and Buffers instead (to match the rest of the paragraph).

@gibfahn

gibfahn May 19, 2017

Member

Can you add an 'a' before 'string' here too?

Went with strings and Buffers instead (to match the rest of the paragraph).

@mscdex

This comment has been minimized.

Show comment
Hide comment
@mscdex

mscdex Feb 14, 2017

Contributor

The first line of the commit message should target the doc subsystem.

Contributor

mscdex commented Feb 14, 2017

The first line of the commit message should target the doc subsystem.

@gibfahn

This comment has been minimized.

Show comment
Hide comment
@gibfahn

gibfahn Feb 14, 2017

Member

Probably worth adding Fixes: #11352 and Refs: #11316 lines to the commit message. With @mscdex's nit above, you could probably do this for the commit message:

 doc: don't suggest setEncoding for binary streams

Removed an incorrect reference to the use of setEncoding(null) as the proper
way to handling binary streams or to disable encoding, and explained that the
default encoding is "no encoding", and that this is the correct approach for
dealing with binary data via Buffers.

Fixes: https://github.com/nodejs/node/issues/11352
Refs: https://github.com/nodejs/node/issues/11316

cc/ @sam-github for review

Member

gibfahn commented Feb 14, 2017

Probably worth adding Fixes: #11352 and Refs: #11316 lines to the commit message. With @mscdex's nit above, you could probably do this for the commit message:

 doc: don't suggest setEncoding for binary streams

Removed an incorrect reference to the use of setEncoding(null) as the proper
way to handling binary streams or to disable encoding, and explained that the
default encoding is "no encoding", and that this is the correct approach for
dealing with binary data via Buffers.

Fixes: https://github.com/nodejs/node/issues/11352
Refs: https://github.com/nodejs/node/issues/11316

cc/ @sam-github for review

@gibfahn gibfahn requested a review from sam-github Feb 14, 2017

Setting an encoding causes the stream data
By default, no encoding is assigned and stream data will be returned as
Buffer objects. Setting an encoding causes the stream data

This comment has been minimized.

@cjihrig

cjihrig Feb 14, 2017

Contributor

Can you format Buffer as inline code.

@cjihrig

cjihrig Feb 14, 2017

Contributor

Can you format Buffer as inline code.

@sam-github

LGTM, once @mscdex and @cjihrig 's comments have been addressed

@mcollina

LGTM when the others nits are addressed.

@mcollina

This comment has been minimized.

Show comment
Hide comment
@mcollina

mcollina May 19, 2017

Member

@RickBullotta would you mind addressing the relative nits?
Otherwise, may I land and address the nit while landing this?

Member

mcollina commented May 19, 2017

@RickBullotta would you mind addressing the relative nits?
Otherwise, may I land and address the nit while landing this?

@RickBullotta

This comment has been minimized.

Show comment
Hide comment
@RickBullotta

RickBullotta May 19, 2017

Contributor
Contributor

RickBullotta commented May 19, 2017

@gibfahn gibfahn self-assigned this May 19, 2017

@gibfahn

Will fix nits on landing.

Will fix on landing.

@gibfahn

This comment has been minimized.

Show comment
Hide comment
@gibfahn

gibfahn May 19, 2017

Member

Landed in 8476880

Member

gibfahn commented May 19, 2017

Landed in 8476880

@gibfahn gibfahn closed this May 19, 2017

gibfahn added a commit that referenced this pull request May 19, 2017

doc: don't suggest setEncoding for binary streams
Removed an incorrect reference to the use of setEncoding(null) as the
proper way to handling binary streams or to disable encoding, and
explained that the default encoding is "no encoding", and that this is
the correct approach for dealing with binary data via Buffers.

PR-URL: #11363
Fixes: #11352
Refs: #11316
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
@gibfahn

This comment has been minimized.

Show comment
Hide comment
@gibfahn

gibfahn May 19, 2017

Member

Have at it. The amount of nit picking turned me off to the whole process.

@RickBullotta I'd be really interested to get more feedback from you on this. What would your ideal process be?

Questions:
  • If we had a doc linter that could catch the majority of these nits would you be more willing to fix them?
  • Do you think we're being too picky in general, and should just not worry about formatting?
  • Is the problem in the way the nits were raised?
  • Do you think collaborators should just fix everything on landing and not expect contributors to fix nits in PRs?

There's no right answer for these things, but we're always trying to improve our process, so feedback from people just starting to get involved with the project is very helpful.

Member

gibfahn commented May 19, 2017

Have at it. The amount of nit picking turned me off to the whole process.

@RickBullotta I'd be really interested to get more feedback from you on this. What would your ideal process be?

Questions:
  • If we had a doc linter that could catch the majority of these nits would you be more willing to fix them?
  • Do you think we're being too picky in general, and should just not worry about formatting?
  • Is the problem in the way the nits were raised?
  • Do you think collaborators should just fix everything on landing and not expect contributors to fix nits in PRs?

There's no right answer for these things, but we're always trying to improve our process, so feedback from people just starting to get involved with the project is very helpful.

anchnk added a commit to anchnk/node that referenced this pull request May 19, 2017

doc: don't suggest setEncoding for binary streams
Removed an incorrect reference to the use of setEncoding(null) as the
proper way to handling binary streams or to disable encoding, and
explained that the default encoding is "no encoding", and that this is
the correct approach for dealing with binary data via Buffers.

PR-URL: nodejs#11363
Fixes: nodejs#11352
Refs: nodejs#11316
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
@RickBullotta

This comment has been minimized.

Show comment
Hide comment
@RickBullotta

RickBullotta May 19, 2017

Contributor
Contributor

RickBullotta commented May 19, 2017

@jasnell jasnell referenced this pull request May 28, 2017

Closed

8.0.0 Release Proposal #12220

@gibfahn gibfahn referenced this pull request Jun 15, 2017

Closed

Auditing for 6.11.1 #230

2 of 3 tasks complete
@MylesBorins

This comment has been minimized.

Show comment
Hide comment
@MylesBorins

MylesBorins Jul 17, 2017

Member

is this applicable for v6.x?

Member

MylesBorins commented Jul 17, 2017

is this applicable for v6.x?

@mcollina

This comment has been minimized.

Show comment
Hide comment
@mcollina

mcollina Jul 17, 2017

Member

@MylesBorins yes you can backport.

Member

mcollina commented Jul 17, 2017

@MylesBorins yes you can backport.

MylesBorins added a commit that referenced this pull request Jul 17, 2017

doc: don't suggest setEncoding for binary streams
Removed an incorrect reference to the use of setEncoding(null) as the
proper way to handling binary streams or to disable encoding, and
explained that the default encoding is "no encoding", and that this is
the correct approach for dealing with binary data via Buffers.

PR-URL: #11363
Fixes: #11352
Refs: #11316
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment