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

buffer: deprecate parent property #8332

Closed
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
6 participants
@thefourtheye
Contributor

thefourtheye commented Aug 30, 2016

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

buffer

Description of change

The buffer property already exposes the underlying buffer object. So
this property is being deprecated.

Refer: #8266
Refer: #8311


cc @nodejs/buffer

@addaleax

This comment has been minimized.

Show comment
Hide comment
@addaleax

addaleax Aug 30, 2016

Member

Hmm I don’t want to hijack #7964 with a discussion of this specific issue, so I’m commenting here.
I’m basically agreeing with what @bnoordhuis said over there, so far I don’t see any good reason for a runtime deprecation.
We’re in a bit of a pickle here in that a docs-only deprecation is hard because, um, there are no docs on this… I guess my suggestion would be just leaving it undocumented.

Member

addaleax commented Aug 30, 2016

Hmm I don’t want to hijack #7964 with a discussion of this specific issue, so I’m commenting here.
I’m basically agreeing with what @bnoordhuis said over there, so far I don’t see any good reason for a runtime deprecation.
We’re in a bit of a pickle here in that a docs-only deprecation is hard because, um, there are no docs on this… I guess my suggestion would be just leaving it undocumented.

@trevnorris

This comment has been minimized.

Show comment
Hide comment
@trevnorris

trevnorris Sep 8, 2016

Contributor

I find it a bit annoying b/c it's undocumented, and untested. Honestly we might as well just set buf.parent = buf.buffer and be done w/ it.

Contributor

trevnorris commented Sep 8, 2016

I find it a bit annoying b/c it's undocumented, and untested. Honestly we might as well just set buf.parent = buf.buffer and be done w/ it.

@thefourtheye

This comment has been minimized.

Show comment
Hide comment
@thefourtheye

thefourtheye Jan 10, 2017

Contributor

@nodejs/ctc How do we feel about just doc-deprecating this, based on #7964 (comment)?

An in my opinion valid reason for deprecating buffer.parent - in the documentation - is that there should be a canonical way of doing things. It lowers friction for new users and eases maintenance for existing users and is generally always a good thing. That's why I think it's proper for the documentation to say "don't use this thing, use that."

Contributor

thefourtheye commented Jan 10, 2017

@nodejs/ctc How do we feel about just doc-deprecating this, based on #7964 (comment)?

An in my opinion valid reason for deprecating buffer.parent - in the documentation - is that there should be a canonical way of doing things. It lowers friction for new users and eases maintenance for existing users and is generally always a good thing. That's why I think it's proper for the documentation to say "don't use this thing, use that."

@jasnell

This comment has been minimized.

Show comment
Hide comment
@jasnell

jasnell Jan 10, 2017

Member

I'm good with a docs-only deprecation

Member

jasnell commented Jan 10, 2017

I'm good with a docs-only deprecation

doc: document buffer.buffer property
Buffer objects expose the underlying `Uint8Array`'s `buffer` property
by default. This patch formally documents it.
@thefourtheye

This comment has been minimized.

Show comment
Hide comment
@thefourtheye

thefourtheye Jan 10, 2017

Contributor

Updated the PR with docs-only deprecation. PTAL.

Contributor

thefourtheye commented Jan 10, 2017

Updated the PR with docs-only deprecation. PTAL.

### buf.parent
> Stability: 0 - Deprecated: Use [`buf.buffer`] instead.

This comment has been minimized.

@jasnell

jasnell Jan 10, 2017

Member

Might add here a quick comment saying something like:

The `buf.parent` property is a deprecated alias for `buf.buffer`.
@jasnell

jasnell Jan 10, 2017

Member

Might add here a quick comment saying something like:

The `buf.parent` property is a deprecated alias for `buf.buffer`.

This comment has been minimized.

@thefourtheye

thefourtheye Jan 13, 2017

Contributor

Ack!

@thefourtheye

thefourtheye Jan 13, 2017

Contributor

Ack!

doc: deprecate buffer's parent property
`buffer.parent` property is actually a wrapper over `buffer.buffer`
property. This patch actually doc-deprecates it and points the users to
the `buffer.buffer` property.
@thefourtheye

This comment has been minimized.

Show comment
Hide comment
@thefourtheye

thefourtheye Jan 18, 2017

Contributor

Landed in d708700 and 03d440e

Contributor

thefourtheye commented Jan 18, 2017

Landed in d708700 and 03d440e

@thefourtheye thefourtheye deleted the thefourtheye:buffer-deprecate-parent branch Jan 18, 2017

thefourtheye added a commit that referenced this pull request Jan 18, 2017

doc: document buffer.buffer property
Buffer objects expose the underlying `Uint8Array`'s `buffer` property
by default. This patch formally documents it.

PR-URL: #8332
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>

thefourtheye added a commit that referenced this pull request Jan 18, 2017

doc: deprecate buffer's parent property
`buffer.parent` property is actually an alias of `buffer.buffer`
property. This patch actually doc-deprecates it and points the users to
the `buffer.buffer` property.

PR-URL: #8332
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>

italoacasas added a commit to italoacasas/node that referenced this pull request Jan 18, 2017

doc: document buffer.buffer property
Buffer objects expose the underlying `Uint8Array`'s `buffer` property
by default. This patch formally documents it.

PR-URL: nodejs#8332
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>

italoacasas added a commit to italoacasas/node that referenced this pull request Jan 18, 2017

doc: deprecate buffer's parent property
`buffer.parent` property is actually an alias of `buffer.buffer`
property. This patch actually doc-deprecates it and points the users to
the `buffer.buffer` property.

PR-URL: nodejs#8332
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
@MylesBorins

This comment has been minimized.

Show comment
Hide comment
@MylesBorins

MylesBorins Jan 23, 2017

Member

@Fishrock123 bot should not be tagging semver major commits for lts

Member

MylesBorins commented Jan 23, 2017

@Fishrock123 bot should not be tagging semver major commits for lts

@jasnell jasnell referenced this pull request Apr 4, 2017

Closed

8.0.0 Release Proposal #12220

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment