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

src, buffer: add --pending-deprecation flag #11968

Closed
wants to merge 2 commits into
from

Conversation

@jasnell
Member

jasnell commented Mar 21, 2017

This PR was split out of #11808 by request of the @nodejs/ctc.

This adds a new --pending-deprecation command line flag and equivalent NODE_PENDING_DEPRECATION environment variable. These are used to cause
core to emit pending DeprecationWarnings that are off by default.

A pending deprecation warning for use of Buffer() and new Buffer() is included. The pending deprecation warning is off by default and is only emitted when the new pending deprecation
flag is used.

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

src, buffer

Show outdated Hide outdated lib/buffer.js
super(arg1, arg2, arg3);
}
}
const FastBuffer = (() => class Buffer extends Uint8Array {})();

This comment has been minimized.

@mscdex

mscdex Mar 22, 2017

Contributor

Why this change?

@mscdex

mscdex Mar 22, 2017

Contributor

Why this change?

This comment has been minimized.

@jasnell

jasnell Mar 22, 2017

Member

This is a workaround to ensure that Uint8Array inherited methods work correctly. See: #11808 (review)

@jasnell

jasnell Mar 22, 2017

Member

This is a workaround to ensure that Uint8Array inherited methods work correctly. See: #11808 (review)

This comment has been minimized.

@ChALkeR

ChALkeR Mar 22, 2017

Member

Can more people please review this specific change for us to be on the safe side?
/cc @nodejs/buffer

@ChALkeR

ChALkeR Mar 22, 2017

Member

Can more people please review this specific change for us to be on the safe side?
/cc @nodejs/buffer

This comment has been minimized.

@addaleax

addaleax Mar 22, 2017

Member

So… what this would break, afaik, is that Buffer.prototype.constructor === Buffer no longer holds true, which is a bit odd but something we might be able to just accept. Everything else, including instanceof and buf.constructor.name, should continue to work fine.

One alternative way that was brought up, and I think I might prefer that, we should be able to set FastBuffer[Symbol.species] to FastBuffer, that should keep the Uint8Array methods working, too. (Didn’t try that out, though).

@addaleax

addaleax Mar 22, 2017

Member

So… what this would break, afaik, is that Buffer.prototype.constructor === Buffer no longer holds true, which is a bit odd but something we might be able to just accept. Everything else, including instanceof and buf.constructor.name, should continue to work fine.

One alternative way that was brought up, and I think I might prefer that, we should be able to set FastBuffer[Symbol.species] to FastBuffer, that should keep the Uint8Array methods working, too. (Didn’t try that out, though).

This comment has been minimized.

@targos

targos Mar 23, 2017

Member

I added the explicit constructor to fix a performance regression in #8754
Can we keep it or check that current V8 version doesn't have the issue?

@targos

targos Mar 23, 2017

Member

I added the explicit constructor to fix a performance regression in #8754
Can we keep it or check that current V8 version doesn't have the issue?

This comment has been minimized.

@jasnell

jasnell Mar 31, 2017

Member

@addaleax ... setting the Symbol.species on the old version of FastBuffer has no impact, unfortunately. Still playing with it tho

@jasnell

jasnell Mar 31, 2017

Member

@addaleax ... setting the Symbol.species on the old version of FastBuffer has no impact, unfortunately. Still playing with it tho

This comment has been minimized.

@addaleax

addaleax Mar 31, 2017

Member

@jasnell Do you have that code pushed somewhere? I mean, if it does have no effect, that would be a bug, right?

@addaleax

addaleax Mar 31, 2017

Member

@jasnell Do you have that code pushed somewhere? I mean, if it does have no effect, that would be a bug, right?

This comment has been minimized.

@jasnell

jasnell Mar 31, 2017

Member

:-) ... I was hanging the Symbol.species off the wrong thing... attaching it to Buffer[Symbol.species] appears to work. Still testing tho

@jasnell

jasnell Mar 31, 2017

Member

:-) ... I was hanging the Symbol.species off the wrong thing... attaching it to Buffer[Symbol.species] appears to work. Still testing tho

@ChALkeR

This comment has been minimized.

Show comment
Hide comment
@ChALkeR

ChALkeR Mar 22, 2017

Member

Perhaps a testcase for NODE_PENDING_DEPRECATION env variable could be added?

Member

ChALkeR commented Mar 22, 2017

Perhaps a testcase for NODE_PENDING_DEPRECATION env variable could be added?

@silverwind

This comment has been minimized.

Show comment
Hide comment
@silverwind

silverwind Mar 22, 2017

Contributor

Both the flag and the env variable need to be documented in node.1, --help, and in cli.md.

Contributor

silverwind commented Mar 22, 2017

Both the flag and the env variable need to be documented in node.1, --help, and in cli.md.

@jasnell

This comment has been minimized.

Show comment
Hide comment
@jasnell

jasnell Mar 22, 2017

Member

@ChALkeR @silverwind ... done! I added a new test for both --pending-deprecation and NODE_PENDING_DEPRECATION, and added the documentation for both.

Member

jasnell commented Mar 22, 2017

@ChALkeR @silverwind ... done! I added a new test for both --pending-deprecation and NODE_PENDING_DEPRECATION, and added the documentation for both.

added: REPLACEME
-->
Emit pending deprecation warnings.

This comment has been minimized.

@silverwind

silverwind Mar 22, 2017

Contributor

Maybe add a sentence with the purpose of a pending deprecation?

@silverwind

silverwind Mar 22, 2017

Contributor

Maybe add a sentence with the purpose of a pending deprecation?

This comment has been minimized.

@Trott

Trott Mar 23, 2017

Member

Optional: Maybe also specify that it's specifically the runtime deprecation that's pending, and that stuff is frequently deprecated in the docs but with no runtime deprecation message. Or something. We differentiate between "runtime deprecation" and "docs deprecation" pretty much everywhere, so it seems like there ought to be some clarity when people are using this flag.

That said, I'm fine with this landing without that information. I know it's crunch time on this stuff right now. It can always be added in a subsequent pull request if it turns out that it's important to include.

@Trott

Trott Mar 23, 2017

Member

Optional: Maybe also specify that it's specifically the runtime deprecation that's pending, and that stuff is frequently deprecated in the docs but with no runtime deprecation message. Or something. We differentiate between "runtime deprecation" and "docs deprecation" pretty much everywhere, so it seems like there ought to be some clarity when people are using this flag.

That said, I'm fine with this landing without that information. I know it's crunch time on this stuff right now. It can always be added in a subsequent pull request if it turns out that it's important to include.

This comment has been minimized.

@jasnell

jasnell Mar 23, 2017

Member

Updated to add an explanatory note.

@jasnell

jasnell Mar 23, 2017

Member

Updated to add an explanatory note.

@targos

targos approved these changes Mar 23, 2017

Show outdated Hide outdated lib/buffer.js
super(arg1, arg2, arg3);
}
}
const FastBuffer = (() => class Buffer extends Uint8Array {})();

This comment has been minimized.

@targos

targos Mar 23, 2017

Member

I added the explicit constructor to fix a performance regression in #8754
Can we keep it or check that current V8 version doesn't have the issue?

@targos

targos Mar 23, 2017

Member

I added the explicit constructor to fix a performance regression in #8754
Can we keep it or check that current V8 version doesn't have the issue?

@jasnell

This comment has been minimized.

Show comment
Hide comment
@jasnell

jasnell Mar 23, 2017

Member

@targos ...

Benchmark results for buffer-from
PR to master

improvement confidence      p.value
buffers/buffer-from.js n=1024 len=10 source="array"                   -16.42 %        *** 7.792262e-11
buffers/buffer-from.js n=1024 len=10 source="arraybuffer-middle"      -21.38 %        *** 2.168308e-06
buffers/buffer-from.js n=1024 len=10 source="arraybuffer"             -22.32 %        *** 2.294274e-09
buffers/buffer-from.js n=1024 len=10 source="buffer"                  -17.65 %        *** 1.350472e-05
buffers/buffer-from.js n=1024 len=10 source="object"                  -12.25 %        *** 1.180961e-06
buffers/buffer-from.js n=1024 len=10 source="string-base64"            -7.05 %        *** 2.333473e-04
buffers/buffer-from.js n=1024 len=10 source="string"                  -12.77 %        *** 6.414072e-04
buffers/buffer-from.js n=1024 len=10 source="uint8array"              -15.14 %        *** 1.109671e-06
buffers/buffer-from.js n=1024 len=2048 source="array"                  -1.83 %            3.509761e-01
buffers/buffer-from.js n=1024 len=2048 source="arraybuffer-middle"    -24.98 %        *** 3.233412e-11
buffers/buffer-from.js n=1024 len=2048 source="arraybuffer"           -18.99 %        *** 1.380310e-07
buffers/buffer-from.js n=1024 len=2048 source="buffer"                 -8.26 %          * 1.192811e-02
buffers/buffer-from.js n=1024 len=2048 source="object"                -13.14 %        *** 1.258989e-07
buffers/buffer-from.js n=1024 len=2048 source="string-base64"          -2.15 %          * 3.041810e-02
buffers/buffer-from.js n=1024 len=2048 source="string"                 -1.00 %            7.109994e-01
buffers/buffer-from.js n=1024 len=2048 source="uint8array"             -6.50 %          * 1.043962e-02

PR to v7-latest

improvement confidence      p.value
buffers/buffer-from.js n=1024 len=10 source="array"                    14.66 %          * 4.128284e-02
buffers/buffer-from.js n=1024 len=10 source="arraybuffer-middle"      -31.02 %        *** 1.252807e-07
buffers/buffer-from.js n=1024 len=10 source="arraybuffer"             -33.07 %        *** 2.434402e-08
buffers/buffer-from.js n=1024 len=10 source="buffer"                   11.13 %            7.116099e-02
buffers/buffer-from.js n=1024 len=10 source="object"                   27.77 %        *** 4.621124e-04
buffers/buffer-from.js n=1024 len=10 source="string-base64"           -18.06 %         ** 2.839069e-03
buffers/buffer-from.js n=1024 len=10 source="string"                  -22.87 %        *** 3.704564e-05
buffers/buffer-from.js n=1024 len=10 source="uint8array"              -10.61 %          * 2.388147e-02
buffers/buffer-from.js n=1024 len=2048 source="array"                  -2.76 %            6.038384e-01
buffers/buffer-from.js n=1024 len=2048 source="arraybuffer-middle"    -32.39 %        *** 2.247906e-08
buffers/buffer-from.js n=1024 len=2048 source="arraybuffer"           -33.12 %        *** 6.387633e-09
buffers/buffer-from.js n=1024 len=2048 source="buffer"                  8.03 %            1.359963e-01
buffers/buffer-from.js n=1024 len=2048 source="object"                 30.79 %        *** 2.044209e-04
buffers/buffer-from.js n=1024 len=2048 source="string-base64"          -2.57 %            6.409698e-01
buffers/buffer-from.js n=1024 len=2048 source="string"                 -8.51 %            8.553839e-02
buffers/buffer-from.js n=1024 len=2048 source="uint8array"            293.43 %        *** 1.781736e-22

master to v7-latest

improvement confidence      p.value
buffers/buffer-from.js n=1024 len=10 source="array"                    37.57 %        *** 1.781021e-12
buffers/buffer-from.js n=1024 len=10 source="arraybuffer-middle"      -13.65 %        *** 4.060694e-07
buffers/buffer-from.js n=1024 len=10 source="arraybuffer"             -12.98 %        *** 2.349020e-05
buffers/buffer-from.js n=1024 len=10 source="buffer"                   26.04 %        *** 4.158553e-10
buffers/buffer-from.js n=1024 len=10 source="object"                   44.97 %        *** 6.654504e-18
buffers/buffer-from.js n=1024 len=10 source="string-base64"           -10.05 %        *** 9.244411e-05
buffers/buffer-from.js n=1024 len=10 source="string"                  -18.68 %        *** 6.452878e-13
buffers/buffer-from.js n=1024 len=10 source="uint8array"                0.37 %            8.982949e-01
buffers/buffer-from.js n=1024 len=2048 source="array"                   3.59 %          * 3.594595e-02
buffers/buffer-from.js n=1024 len=2048 source="arraybuffer-middle"    -14.08 %        *** 2.082821e-04
buffers/buffer-from.js n=1024 len=2048 source="arraybuffer"           -13.67 %        *** 7.702316e-07
buffers/buffer-from.js n=1024 len=2048 source="buffer"                 11.01 %         ** 4.616398e-03
buffers/buffer-from.js n=1024 len=2048 source="object"                 42.88 %        *** 2.021887e-16
buffers/buffer-from.js n=1024 len=2048 source="string-base64"           1.39 %            5.063980e-01
buffers/buffer-from.js n=1024 len=2048 source="string"                 -5.65 %        *** 4.850306e-04
buffers/buffer-from.js n=1024 len=2048 source="uint8array"            321.70 %        *** 2.335348e-28

I'm running the buffer-creation benchmarks now

Benchmark results for buffer-creation
PR vs v7-latest
                                                                    improvement confidence      p.value
 buffers/buffer-creation.js n=1024 len=10 type="buffer()"              -37.70 %        *** 8.170936e-07
 buffers/buffer-creation.js n=1024 len=10 type="fast-alloc-fill"       -22.43 %        *** 4.234106e-04
 buffers/buffer-creation.js n=1024 len=10 type="fast-alloc"            -18.70 %         ** 2.991527e-03
 buffers/buffer-creation.js n=1024 len=10 type="fast-allocUnsafe"      -39.59 %        *** 2.983973e-09
 buffers/buffer-creation.js n=1024 len=10 type="slow-allocUnsafe"      -25.74 %        *** 5.983443e-05
 buffers/buffer-creation.js n=1024 len=10 type="slow"                  -27.11 %        *** 1.038236e-05
 buffers/buffer-creation.js n=1024 len=1024 type="buffer()"            -28.41 %        *** 2.246628e-05
 buffers/buffer-creation.js n=1024 len=1024 type="fast-alloc-fill"     -10.43 %            1.321668e-01
 buffers/buffer-creation.js n=1024 len=1024 type="fast-alloc"          -10.79 %            7.761290e-02
 buffers/buffer-creation.js n=1024 len=1024 type="fast-allocUnsafe"    -29.88 %        *** 2.164879e-06
 buffers/buffer-creation.js n=1024 len=1024 type="slow-allocUnsafe"    -21.92 %        *** 3.027289e-04
 buffers/buffer-creation.js n=1024 len=1024 type="slow"                -23.86 %        *** 3.208618e-04
 buffers/buffer-creation.js n=1024 len=2048 type="buffer()"            -22.88 %         ** 1.258741e-03
 buffers/buffer-creation.js n=1024 len=2048 type="fast-alloc-fill"      -9.78 %            1.632281e-01
 buffers/buffer-creation.js n=1024 len=2048 type="fast-alloc"          -11.73 %          * 4.364843e-02
 buffers/buffer-creation.js n=1024 len=2048 type="fast-allocUnsafe"    -22.75 %        *** 7.573624e-04
 buffers/buffer-creation.js n=1024 len=2048 type="slow-allocUnsafe"    -19.22 %         ** 6.876306e-03
 buffers/buffer-creation.js n=1024 len=2048 type="slow"                -19.85 %         ** 1.531455e-03
 buffers/buffer-creation.js n=1024 len=4096 type="buffer()"             -9.88 %            1.343226e-01
 buffers/buffer-creation.js n=1024 len=4096 type="fast-alloc-fill"     -12.65 %          * 3.085357e-02
 buffers/buffer-creation.js n=1024 len=4096 type="fast-alloc"           -6.36 %            2.733906e-01
 buffers/buffer-creation.js n=1024 len=4096 type="fast-allocUnsafe"    -10.92 %            1.366664e-01
 buffers/buffer-creation.js n=1024 len=4096 type="slow-allocUnsafe"    -19.47 %         ** 8.094237e-03
 buffers/buffer-creation.js n=1024 len=4096 type="slow"                -18.56 %         ** 3.257171e-03
 buffers/buffer-creation.js n=1024 len=8192 type="buffer()"            -25.61 %        *** 8.851354e-04
 buffers/buffer-creation.js n=1024 len=8192 type="fast-alloc-fill"     -25.86 %        *** 3.210301e-05
 buffers/buffer-creation.js n=1024 len=8192 type="fast-alloc"          -18.27 %         ** 1.576755e-03
 buffers/buffer-creation.js n=1024 len=8192 type="fast-allocUnsafe"    -24.54 %         ** 1.267306e-03
 buffers/buffer-creation.js n=1024 len=8192 type="slow-allocUnsafe"    -22.22 %         ** 2.361535e-03
 buffers/buffer-creation.js n=1024 len=8192 type="slow"                -24.95 %         ** 1.274023e-03

PR to Master
                                                                    improvement confidence      p.value
 buffers/buffer-creation.js n=1024 len=10 type="buffer()"              -23.82 %        *** 4.603310e-07
 buffers/buffer-creation.js n=1024 len=10 type="fast-alloc-fill"        -8.98 %          * 4.796022e-02
 buffers/buffer-creation.js n=1024 len=10 type="fast-alloc"             -9.66 %          * 2.705076e-02
 buffers/buffer-creation.js n=1024 len=10 type="fast-allocUnsafe"      -21.20 %        *** 1.350862e-04
 buffers/buffer-creation.js n=1024 len=10 type="slow-allocUnsafe"       -8.17 %          * 4.477244e-02
 buffers/buffer-creation.js n=1024 len=10 type="slow"                   -8.14 %            7.364837e-02
 buffers/buffer-creation.js n=1024 len=1024 type="buffer()"            -12.14 %         ** 1.536780e-03
 buffers/buffer-creation.js n=1024 len=1024 type="fast-alloc-fill"      -2.95 %            4.062755e-01
 buffers/buffer-creation.js n=1024 len=1024 type="fast-alloc"           -7.04 %            6.421243e-02
 buffers/buffer-creation.js n=1024 len=1024 type="fast-allocUnsafe"    -21.17 %        *** 3.190386e-04
 buffers/buffer-creation.js n=1024 len=1024 type="slow-allocUnsafe"     -5.00 %            2.486273e-01
 buffers/buffer-creation.js n=1024 len=1024 type="slow"                 -2.82 %            5.463033e-01
 buffers/buffer-creation.js n=1024 len=2048 type="buffer()"             -4.22 %            4.282637e-01
 buffers/buffer-creation.js n=1024 len=2048 type="fast-alloc-fill"      -6.86 %          * 4.507429e-02
 buffers/buffer-creation.js n=1024 len=2048 type="fast-alloc"           -4.34 %            3.098785e-01
 buffers/buffer-creation.js n=1024 len=2048 type="fast-allocUnsafe"    -12.63 %          * 1.633488e-02
 buffers/buffer-creation.js n=1024 len=2048 type="slow-allocUnsafe"     -0.03 %            9.952215e-01
 buffers/buffer-creation.js n=1024 len=2048 type="slow"                 -1.11 %            8.161170e-01
 buffers/buffer-creation.js n=1024 len=4096 type="buffer()"              3.13 %            5.248264e-01
 buffers/buffer-creation.js n=1024 len=4096 type="fast-alloc-fill"      -5.42 %            1.418995e-01
 buffers/buffer-creation.js n=1024 len=4096 type="fast-alloc"           -6.19 %            8.675164e-02
 buffers/buffer-creation.js n=1024 len=4096 type="fast-allocUnsafe"     -5.31 %            2.569296e-01
 buffers/buffer-creation.js n=1024 len=4096 type="slow-allocUnsafe"     -1.27 %            8.108671e-01
 buffers/buffer-creation.js n=1024 len=4096 type="slow"                 -0.12 %            9.768392e-01
 buffers/buffer-creation.js n=1024 len=8192 type="buffer()"             15.40 %            1.746439e-01
 buffers/buffer-creation.js n=1024 len=8192 type="fast-alloc-fill"      -1.56 %            8.272071e-01
 buffers/buffer-creation.js n=1024 len=8192 type="fast-alloc"           -2.94 %            7.164391e-01
 buffers/buffer-creation.js n=1024 len=8192 type="fast-allocUnsafe"      4.65 %            6.791579e-01
 buffers/buffer-creation.js n=1024 len=8192 type="slow-allocUnsafe"    -15.99 %            9.725391e-02
 buffers/buffer-creation.js n=1024 len=8192 type="slow"                -15.01 %            1.110732e-01

master to v7-latest

                                                                    improvement confidence      p.value
 buffers/buffer-creation.js n=1024 len=10 type="buffer()"              -19.82 %        *** 2.918161e-06
 buffers/buffer-creation.js n=1024 len=10 type="fast-alloc-fill"       -13.46 %        *** 2.816522e-04
 buffers/buffer-creation.js n=1024 len=10 type="fast-alloc"             -7.80 %         ** 9.382877e-03
 buffers/buffer-creation.js n=1024 len=10 type="fast-allocUnsafe"      -20.60 %        *** 2.080874e-09
 buffers/buffer-creation.js n=1024 len=10 type="slow-allocUnsafe"       -9.86 %        *** 4.085916e-04
 buffers/buffer-creation.js n=1024 len=10 type="slow"                  -11.86 %         ** 2.226668e-03
 buffers/buffer-creation.js n=1024 len=1024 type="buffer()"            -18.86 %        *** 1.114447e-06
 buffers/buffer-creation.js n=1024 len=1024 type="fast-alloc-fill"     -11.83 %        *** 3.524462e-04
 buffers/buffer-creation.js n=1024 len=1024 type="fast-alloc"           -9.32 %         ** 8.059771e-03
 buffers/buffer-creation.js n=1024 len=1024 type="fast-allocUnsafe"     -9.28 %         ** 1.530503e-03
 buffers/buffer-creation.js n=1024 len=1024 type="slow-allocUnsafe"     -7.37 %         ** 1.946543e-03
 buffers/buffer-creation.js n=1024 len=1024 type="slow"                 -8.66 %         ** 2.212602e-03
 buffers/buffer-creation.js n=1024 len=2048 type="buffer()"             -9.55 %         ** 1.281355e-03
 buffers/buffer-creation.js n=1024 len=2048 type="fast-alloc-fill"      -8.09 %          * 1.395453e-02
 buffers/buffer-creation.js n=1024 len=2048 type="fast-alloc"           -4.03 %            1.707212e-01
 buffers/buffer-creation.js n=1024 len=2048 type="fast-allocUnsafe"     -7.36 %          * 4.570890e-02
 buffers/buffer-creation.js n=1024 len=2048 type="slow-allocUnsafe"     -5.30 %            1.155574e-01
 buffers/buffer-creation.js n=1024 len=2048 type="slow"                 -7.37 %         ** 1.663168e-03
 buffers/buffer-creation.js n=1024 len=4096 type="buffer()"             -6.45 %         ** 1.664182e-03
 buffers/buffer-creation.js n=1024 len=4096 type="fast-alloc-fill"      -7.76 %          * 2.186373e-02
 buffers/buffer-creation.js n=1024 len=4096 type="fast-alloc"           -2.32 %            2.932382e-01
 buffers/buffer-creation.js n=1024 len=4096 type="fast-allocUnsafe"     -6.03 %         ** 4.181543e-03
 buffers/buffer-creation.js n=1024 len=4096 type="slow-allocUnsafe"     -6.37 %         ** 8.358552e-03
 buffers/buffer-creation.js n=1024 len=4096 type="slow"                 -7.15 %          * 1.098388e-02
 buffers/buffer-creation.js n=1024 len=8192 type="buffer()"            -19.75 %         ** 8.360417e-03
 buffers/buffer-creation.js n=1024 len=8192 type="fast-alloc-fill"     -20.11 %        *** 1.702175e-04
 buffers/buffer-creation.js n=1024 len=8192 type="fast-alloc"          -19.21 %        *** 3.986116e-04
 buffers/buffer-creation.js n=1024 len=8192 type="fast-allocUnsafe"    -26.04 %        *** 6.409609e-04
 buffers/buffer-creation.js n=1024 len=8192 type="slow-allocUnsafe"    -27.41 %        *** 6.028415e-04
 buffers/buffer-creation.js n=1024 len=8192 type="slow"                -19.57 %          * 1.026433e-02
Member

jasnell commented Mar 23, 2017

@targos ...

Benchmark results for buffer-from
PR to master

improvement confidence      p.value
buffers/buffer-from.js n=1024 len=10 source="array"                   -16.42 %        *** 7.792262e-11
buffers/buffer-from.js n=1024 len=10 source="arraybuffer-middle"      -21.38 %        *** 2.168308e-06
buffers/buffer-from.js n=1024 len=10 source="arraybuffer"             -22.32 %        *** 2.294274e-09
buffers/buffer-from.js n=1024 len=10 source="buffer"                  -17.65 %        *** 1.350472e-05
buffers/buffer-from.js n=1024 len=10 source="object"                  -12.25 %        *** 1.180961e-06
buffers/buffer-from.js n=1024 len=10 source="string-base64"            -7.05 %        *** 2.333473e-04
buffers/buffer-from.js n=1024 len=10 source="string"                  -12.77 %        *** 6.414072e-04
buffers/buffer-from.js n=1024 len=10 source="uint8array"              -15.14 %        *** 1.109671e-06
buffers/buffer-from.js n=1024 len=2048 source="array"                  -1.83 %            3.509761e-01
buffers/buffer-from.js n=1024 len=2048 source="arraybuffer-middle"    -24.98 %        *** 3.233412e-11
buffers/buffer-from.js n=1024 len=2048 source="arraybuffer"           -18.99 %        *** 1.380310e-07
buffers/buffer-from.js n=1024 len=2048 source="buffer"                 -8.26 %          * 1.192811e-02
buffers/buffer-from.js n=1024 len=2048 source="object"                -13.14 %        *** 1.258989e-07
buffers/buffer-from.js n=1024 len=2048 source="string-base64"          -2.15 %          * 3.041810e-02
buffers/buffer-from.js n=1024 len=2048 source="string"                 -1.00 %            7.109994e-01
buffers/buffer-from.js n=1024 len=2048 source="uint8array"             -6.50 %          * 1.043962e-02

PR to v7-latest

improvement confidence      p.value
buffers/buffer-from.js n=1024 len=10 source="array"                    14.66 %          * 4.128284e-02
buffers/buffer-from.js n=1024 len=10 source="arraybuffer-middle"      -31.02 %        *** 1.252807e-07
buffers/buffer-from.js n=1024 len=10 source="arraybuffer"             -33.07 %        *** 2.434402e-08
buffers/buffer-from.js n=1024 len=10 source="buffer"                   11.13 %            7.116099e-02
buffers/buffer-from.js n=1024 len=10 source="object"                   27.77 %        *** 4.621124e-04
buffers/buffer-from.js n=1024 len=10 source="string-base64"           -18.06 %         ** 2.839069e-03
buffers/buffer-from.js n=1024 len=10 source="string"                  -22.87 %        *** 3.704564e-05
buffers/buffer-from.js n=1024 len=10 source="uint8array"              -10.61 %          * 2.388147e-02
buffers/buffer-from.js n=1024 len=2048 source="array"                  -2.76 %            6.038384e-01
buffers/buffer-from.js n=1024 len=2048 source="arraybuffer-middle"    -32.39 %        *** 2.247906e-08
buffers/buffer-from.js n=1024 len=2048 source="arraybuffer"           -33.12 %        *** 6.387633e-09
buffers/buffer-from.js n=1024 len=2048 source="buffer"                  8.03 %            1.359963e-01
buffers/buffer-from.js n=1024 len=2048 source="object"                 30.79 %        *** 2.044209e-04
buffers/buffer-from.js n=1024 len=2048 source="string-base64"          -2.57 %            6.409698e-01
buffers/buffer-from.js n=1024 len=2048 source="string"                 -8.51 %            8.553839e-02
buffers/buffer-from.js n=1024 len=2048 source="uint8array"            293.43 %        *** 1.781736e-22

master to v7-latest

improvement confidence      p.value
buffers/buffer-from.js n=1024 len=10 source="array"                    37.57 %        *** 1.781021e-12
buffers/buffer-from.js n=1024 len=10 source="arraybuffer-middle"      -13.65 %        *** 4.060694e-07
buffers/buffer-from.js n=1024 len=10 source="arraybuffer"             -12.98 %        *** 2.349020e-05
buffers/buffer-from.js n=1024 len=10 source="buffer"                   26.04 %        *** 4.158553e-10
buffers/buffer-from.js n=1024 len=10 source="object"                   44.97 %        *** 6.654504e-18
buffers/buffer-from.js n=1024 len=10 source="string-base64"           -10.05 %        *** 9.244411e-05
buffers/buffer-from.js n=1024 len=10 source="string"                  -18.68 %        *** 6.452878e-13
buffers/buffer-from.js n=1024 len=10 source="uint8array"                0.37 %            8.982949e-01
buffers/buffer-from.js n=1024 len=2048 source="array"                   3.59 %          * 3.594595e-02
buffers/buffer-from.js n=1024 len=2048 source="arraybuffer-middle"    -14.08 %        *** 2.082821e-04
buffers/buffer-from.js n=1024 len=2048 source="arraybuffer"           -13.67 %        *** 7.702316e-07
buffers/buffer-from.js n=1024 len=2048 source="buffer"                 11.01 %         ** 4.616398e-03
buffers/buffer-from.js n=1024 len=2048 source="object"                 42.88 %        *** 2.021887e-16
buffers/buffer-from.js n=1024 len=2048 source="string-base64"           1.39 %            5.063980e-01
buffers/buffer-from.js n=1024 len=2048 source="string"                 -5.65 %        *** 4.850306e-04
buffers/buffer-from.js n=1024 len=2048 source="uint8array"            321.70 %        *** 2.335348e-28

I'm running the buffer-creation benchmarks now

Benchmark results for buffer-creation
PR vs v7-latest
                                                                    improvement confidence      p.value
 buffers/buffer-creation.js n=1024 len=10 type="buffer()"              -37.70 %        *** 8.170936e-07
 buffers/buffer-creation.js n=1024 len=10 type="fast-alloc-fill"       -22.43 %        *** 4.234106e-04
 buffers/buffer-creation.js n=1024 len=10 type="fast-alloc"            -18.70 %         ** 2.991527e-03
 buffers/buffer-creation.js n=1024 len=10 type="fast-allocUnsafe"      -39.59 %        *** 2.983973e-09
 buffers/buffer-creation.js n=1024 len=10 type="slow-allocUnsafe"      -25.74 %        *** 5.983443e-05
 buffers/buffer-creation.js n=1024 len=10 type="slow"                  -27.11 %        *** 1.038236e-05
 buffers/buffer-creation.js n=1024 len=1024 type="buffer()"            -28.41 %        *** 2.246628e-05
 buffers/buffer-creation.js n=1024 len=1024 type="fast-alloc-fill"     -10.43 %            1.321668e-01
 buffers/buffer-creation.js n=1024 len=1024 type="fast-alloc"          -10.79 %            7.761290e-02
 buffers/buffer-creation.js n=1024 len=1024 type="fast-allocUnsafe"    -29.88 %        *** 2.164879e-06
 buffers/buffer-creation.js n=1024 len=1024 type="slow-allocUnsafe"    -21.92 %        *** 3.027289e-04
 buffers/buffer-creation.js n=1024 len=1024 type="slow"                -23.86 %        *** 3.208618e-04
 buffers/buffer-creation.js n=1024 len=2048 type="buffer()"            -22.88 %         ** 1.258741e-03
 buffers/buffer-creation.js n=1024 len=2048 type="fast-alloc-fill"      -9.78 %            1.632281e-01
 buffers/buffer-creation.js n=1024 len=2048 type="fast-alloc"          -11.73 %          * 4.364843e-02
 buffers/buffer-creation.js n=1024 len=2048 type="fast-allocUnsafe"    -22.75 %        *** 7.573624e-04
 buffers/buffer-creation.js n=1024 len=2048 type="slow-allocUnsafe"    -19.22 %         ** 6.876306e-03
 buffers/buffer-creation.js n=1024 len=2048 type="slow"                -19.85 %         ** 1.531455e-03
 buffers/buffer-creation.js n=1024 len=4096 type="buffer()"             -9.88 %            1.343226e-01
 buffers/buffer-creation.js n=1024 len=4096 type="fast-alloc-fill"     -12.65 %          * 3.085357e-02
 buffers/buffer-creation.js n=1024 len=4096 type="fast-alloc"           -6.36 %            2.733906e-01
 buffers/buffer-creation.js n=1024 len=4096 type="fast-allocUnsafe"    -10.92 %            1.366664e-01
 buffers/buffer-creation.js n=1024 len=4096 type="slow-allocUnsafe"    -19.47 %         ** 8.094237e-03
 buffers/buffer-creation.js n=1024 len=4096 type="slow"                -18.56 %         ** 3.257171e-03
 buffers/buffer-creation.js n=1024 len=8192 type="buffer()"            -25.61 %        *** 8.851354e-04
 buffers/buffer-creation.js n=1024 len=8192 type="fast-alloc-fill"     -25.86 %        *** 3.210301e-05
 buffers/buffer-creation.js n=1024 len=8192 type="fast-alloc"          -18.27 %         ** 1.576755e-03
 buffers/buffer-creation.js n=1024 len=8192 type="fast-allocUnsafe"    -24.54 %         ** 1.267306e-03
 buffers/buffer-creation.js n=1024 len=8192 type="slow-allocUnsafe"    -22.22 %         ** 2.361535e-03
 buffers/buffer-creation.js n=1024 len=8192 type="slow"                -24.95 %         ** 1.274023e-03

PR to Master
                                                                    improvement confidence      p.value
 buffers/buffer-creation.js n=1024 len=10 type="buffer()"              -23.82 %        *** 4.603310e-07
 buffers/buffer-creation.js n=1024 len=10 type="fast-alloc-fill"        -8.98 %          * 4.796022e-02
 buffers/buffer-creation.js n=1024 len=10 type="fast-alloc"             -9.66 %          * 2.705076e-02
 buffers/buffer-creation.js n=1024 len=10 type="fast-allocUnsafe"      -21.20 %        *** 1.350862e-04
 buffers/buffer-creation.js n=1024 len=10 type="slow-allocUnsafe"       -8.17 %          * 4.477244e-02
 buffers/buffer-creation.js n=1024 len=10 type="slow"                   -8.14 %            7.364837e-02
 buffers/buffer-creation.js n=1024 len=1024 type="buffer()"            -12.14 %         ** 1.536780e-03
 buffers/buffer-creation.js n=1024 len=1024 type="fast-alloc-fill"      -2.95 %            4.062755e-01
 buffers/buffer-creation.js n=1024 len=1024 type="fast-alloc"           -7.04 %            6.421243e-02
 buffers/buffer-creation.js n=1024 len=1024 type="fast-allocUnsafe"    -21.17 %        *** 3.190386e-04
 buffers/buffer-creation.js n=1024 len=1024 type="slow-allocUnsafe"     -5.00 %            2.486273e-01
 buffers/buffer-creation.js n=1024 len=1024 type="slow"                 -2.82 %            5.463033e-01
 buffers/buffer-creation.js n=1024 len=2048 type="buffer()"             -4.22 %            4.282637e-01
 buffers/buffer-creation.js n=1024 len=2048 type="fast-alloc-fill"      -6.86 %          * 4.507429e-02
 buffers/buffer-creation.js n=1024 len=2048 type="fast-alloc"           -4.34 %            3.098785e-01
 buffers/buffer-creation.js n=1024 len=2048 type="fast-allocUnsafe"    -12.63 %          * 1.633488e-02
 buffers/buffer-creation.js n=1024 len=2048 type="slow-allocUnsafe"     -0.03 %            9.952215e-01
 buffers/buffer-creation.js n=1024 len=2048 type="slow"                 -1.11 %            8.161170e-01
 buffers/buffer-creation.js n=1024 len=4096 type="buffer()"              3.13 %            5.248264e-01
 buffers/buffer-creation.js n=1024 len=4096 type="fast-alloc-fill"      -5.42 %            1.418995e-01
 buffers/buffer-creation.js n=1024 len=4096 type="fast-alloc"           -6.19 %            8.675164e-02
 buffers/buffer-creation.js n=1024 len=4096 type="fast-allocUnsafe"     -5.31 %            2.569296e-01
 buffers/buffer-creation.js n=1024 len=4096 type="slow-allocUnsafe"     -1.27 %            8.108671e-01
 buffers/buffer-creation.js n=1024 len=4096 type="slow"                 -0.12 %            9.768392e-01
 buffers/buffer-creation.js n=1024 len=8192 type="buffer()"             15.40 %            1.746439e-01
 buffers/buffer-creation.js n=1024 len=8192 type="fast-alloc-fill"      -1.56 %            8.272071e-01
 buffers/buffer-creation.js n=1024 len=8192 type="fast-alloc"           -2.94 %            7.164391e-01
 buffers/buffer-creation.js n=1024 len=8192 type="fast-allocUnsafe"      4.65 %            6.791579e-01
 buffers/buffer-creation.js n=1024 len=8192 type="slow-allocUnsafe"    -15.99 %            9.725391e-02
 buffers/buffer-creation.js n=1024 len=8192 type="slow"                -15.01 %            1.110732e-01

master to v7-latest

                                                                    improvement confidence      p.value
 buffers/buffer-creation.js n=1024 len=10 type="buffer()"              -19.82 %        *** 2.918161e-06
 buffers/buffer-creation.js n=1024 len=10 type="fast-alloc-fill"       -13.46 %        *** 2.816522e-04
 buffers/buffer-creation.js n=1024 len=10 type="fast-alloc"             -7.80 %         ** 9.382877e-03
 buffers/buffer-creation.js n=1024 len=10 type="fast-allocUnsafe"      -20.60 %        *** 2.080874e-09
 buffers/buffer-creation.js n=1024 len=10 type="slow-allocUnsafe"       -9.86 %        *** 4.085916e-04
 buffers/buffer-creation.js n=1024 len=10 type="slow"                  -11.86 %         ** 2.226668e-03
 buffers/buffer-creation.js n=1024 len=1024 type="buffer()"            -18.86 %        *** 1.114447e-06
 buffers/buffer-creation.js n=1024 len=1024 type="fast-alloc-fill"     -11.83 %        *** 3.524462e-04
 buffers/buffer-creation.js n=1024 len=1024 type="fast-alloc"           -9.32 %         ** 8.059771e-03
 buffers/buffer-creation.js n=1024 len=1024 type="fast-allocUnsafe"     -9.28 %         ** 1.530503e-03
 buffers/buffer-creation.js n=1024 len=1024 type="slow-allocUnsafe"     -7.37 %         ** 1.946543e-03
 buffers/buffer-creation.js n=1024 len=1024 type="slow"                 -8.66 %         ** 2.212602e-03
 buffers/buffer-creation.js n=1024 len=2048 type="buffer()"             -9.55 %         ** 1.281355e-03
 buffers/buffer-creation.js n=1024 len=2048 type="fast-alloc-fill"      -8.09 %          * 1.395453e-02
 buffers/buffer-creation.js n=1024 len=2048 type="fast-alloc"           -4.03 %            1.707212e-01
 buffers/buffer-creation.js n=1024 len=2048 type="fast-allocUnsafe"     -7.36 %          * 4.570890e-02
 buffers/buffer-creation.js n=1024 len=2048 type="slow-allocUnsafe"     -5.30 %            1.155574e-01
 buffers/buffer-creation.js n=1024 len=2048 type="slow"                 -7.37 %         ** 1.663168e-03
 buffers/buffer-creation.js n=1024 len=4096 type="buffer()"             -6.45 %         ** 1.664182e-03
 buffers/buffer-creation.js n=1024 len=4096 type="fast-alloc-fill"      -7.76 %          * 2.186373e-02
 buffers/buffer-creation.js n=1024 len=4096 type="fast-alloc"           -2.32 %            2.932382e-01
 buffers/buffer-creation.js n=1024 len=4096 type="fast-allocUnsafe"     -6.03 %         ** 4.181543e-03
 buffers/buffer-creation.js n=1024 len=4096 type="slow-allocUnsafe"     -6.37 %         ** 8.358552e-03
 buffers/buffer-creation.js n=1024 len=4096 type="slow"                 -7.15 %          * 1.098388e-02
 buffers/buffer-creation.js n=1024 len=8192 type="buffer()"            -19.75 %         ** 8.360417e-03
 buffers/buffer-creation.js n=1024 len=8192 type="fast-alloc-fill"     -20.11 %        *** 1.702175e-04
 buffers/buffer-creation.js n=1024 len=8192 type="fast-alloc"          -19.21 %        *** 3.986116e-04
 buffers/buffer-creation.js n=1024 len=8192 type="fast-allocUnsafe"    -26.04 %        *** 6.409609e-04
 buffers/buffer-creation.js n=1024 len=8192 type="slow-allocUnsafe"    -27.41 %        *** 6.028415e-04
 buffers/buffer-creation.js n=1024 len=8192 type="slow"                -19.57 %          * 1.026433e-02
@ChALkeR

This comment has been minimized.

Show comment
Hide comment
@ChALkeR

ChALkeR Mar 25, 2017

Member

For the record, a heavy +1 for me on this one, but I'm not posting an LGTM because I'm not 100% sure how exactly does the workaround on the FastBuffer line work here.

Member

ChALkeR commented Mar 25, 2017

For the record, a heavy +1 for me on this one, but I'm not posting an LGTM because I'm not 100% sure how exactly does the workaround on the FastBuffer line work here.

@ChALkeR ChALkeR added this to the 8.0.0 milestone Mar 25, 2017

@ChALkeR

This comment has been minimized.

Show comment
Hide comment
@ChALkeR

ChALkeR Mar 25, 2017

Member

We surely can get this in in time for 8.0, right? ;-)

Member

ChALkeR commented Mar 25, 2017

We surely can get this in in time for 8.0, right? ;-)

@jasnell

This comment has been minimized.

Show comment
Hide comment
@jasnell

jasnell Mar 25, 2017

Member
Member

jasnell commented Mar 25, 2017

@targos

This comment has been minimized.

Show comment
Hide comment
@targos

targos Mar 25, 2017

Member

I'm not that happy with the FastBuffer work around either given the perf
hit.

The work around does not work if you implement constructor ?

Member

targos commented Mar 25, 2017

I'm not that happy with the FastBuffer work around either given the perf
hit.

The work around does not work if you implement constructor ?

@jasnell

This comment has been minimized.

Show comment
Hide comment
@jasnell

jasnell Mar 25, 2017

Member

It does! Just did that. It appears to alleviate some of the perf cost (not all but some).

Member

jasnell commented Mar 25, 2017

It does! Just did that. It appears to alleviate some of the perf cost (not all but some).

@jasnell

This comment has been minimized.

Show comment
Hide comment
@jasnell

jasnell Mar 25, 2017

Member

I will update the PR in a minute

Member

jasnell commented Mar 25, 2017

I will update the PR in a minute

@jasnell

This comment has been minimized.

Show comment
Hide comment

@ChALkeR ChALkeR added the security label Mar 25, 2017

@jasnell

This comment has been minimized.

Show comment
Hide comment
@jasnell

jasnell Mar 27, 2017

Member

@nodejs/ctc ... one final check on this before it lands. Are there any objections? Should I hold off until the CTC call on Wednesday?

Member

jasnell commented Mar 27, 2017

@nodejs/ctc ... one final check on this before it lands. Are there any objections? Should I hold off until the CTC call on Wednesday?

@ChALkeR

This comment has been minimized.

Show comment
Hide comment
@ChALkeR

ChALkeR Mar 27, 2017

Member

@jasnell I'm not sure if this isn't a semver-major because of #11968 (comment).

This isn't an objection, though.

Member

ChALkeR commented Mar 27, 2017

@jasnell I'm not sure if this isn't a semver-major because of #11968 (comment).

This isn't an objection, though.

@jasnell

This comment has been minimized.

Show comment
Hide comment
@jasnell

jasnell Mar 27, 2017

Member

I'm ok with making it a semver-major

Member

jasnell commented Mar 27, 2017

I'm ok with making it a semver-major

@addaleax addaleax added semver-major and removed semver-minor labels Mar 27, 2017

@addaleax

This comment has been minimized.

Show comment
Hide comment
@addaleax

addaleax Mar 27, 2017

Member

@ChALkeR Thanks, I missed that this was marked semver-minor. This is definitely semver-major.

Member

addaleax commented Mar 27, 2017

@ChALkeR Thanks, I missed that this was marked semver-minor. This is definitely semver-major.

@Trott

This comment has been minimized.

Show comment
Hide comment
@Trott

Trott Mar 28, 2017

Member

one final check on this before it lands. Are there any objections? Should I hold off until the CTC call on Wednesday?

@jasnell I would say no need to hold off unless there is a Collaborator who objects.

Member

Trott commented Mar 28, 2017

one final check on this before it lands. Are there any objections? Should I hold off until the CTC call on Wednesday?

@jasnell I would say no need to hold off unless there is a Collaborator who objects.

@mscdex

This comment has been minimized.

Show comment
Hide comment
@mscdex

mscdex Mar 28, 2017

Contributor

IMHO I don't see the usefulness of such a mechanism as I expect most people will probably not use it as it is opt-in.

Anyway, I think at least @targos still has a concern about the FastBuffer constructor change.

Contributor

mscdex commented Mar 28, 2017

IMHO I don't see the usefulness of such a mechanism as I expect most people will probably not use it as it is opt-in.

Anyway, I think at least @targos still has a concern about the FastBuffer constructor change.

@cjihrig

This comment has been minimized.

Show comment
Hide comment
@cjihrig

cjihrig Mar 28, 2017

Contributor

I agree with @mscdex. I don't see a point. No one will use it.

Contributor

cjihrig commented Mar 28, 2017

I agree with @mscdex. I don't see a point. No one will use it.

@jasnell

This comment has been minimized.

Show comment
Hide comment
@jasnell

jasnell Mar 28, 2017

Member

It's not really intended to be used by most people, which is precisely why it's off by default. The goal is to give folks running in CI and dev environments a switch they can use to get an early warning for upcoming deprecations.

The bottom line is that we have people telling us that runtime deprecations are too noisy. We have others telling us that without deprecations we can't make progress with certain changes. We endlessly debate and never get anywhere. This PR is not about making everyone happy or even "solving" the problems, it's about finding a compromise that helps advance things in the right direction.

@nodejs/ctc ... It may be necessary to call for a vote on this one.

Member

jasnell commented Mar 28, 2017

It's not really intended to be used by most people, which is precisely why it's off by default. The goal is to give folks running in CI and dev environments a switch they can use to get an early warning for upcoming deprecations.

The bottom line is that we have people telling us that runtime deprecations are too noisy. We have others telling us that without deprecations we can't make progress with certain changes. We endlessly debate and never get anywhere. This PR is not about making everyone happy or even "solving" the problems, it's about finding a compromise that helps advance things in the right direction.

@nodejs/ctc ... It may be necessary to call for a vote on this one.

@jasnell jasnell added the ctc-review label Mar 28, 2017

@cjihrig

This comment has been minimized.

Show comment
Hide comment
@cjihrig

cjihrig Mar 28, 2017

Contributor

I don't think multiple classifications of deprecations in the code are necessary.

The bottom line is that we have people telling us that runtime deprecations are too noisy.

We could turn off all deprecations by default. People who don't care about them don't have to see them.

We have others telling us that without deprecations we can't make progress with certain changes.

Those people could turn deprecations on.

Contributor

cjihrig commented Mar 28, 2017

I don't think multiple classifications of deprecations in the code are necessary.

The bottom line is that we have people telling us that runtime deprecations are too noisy.

We could turn off all deprecations by default. People who don't care about them don't have to see them.

We have others telling us that without deprecations we can't make progress with certain changes.

Those people could turn deprecations on.

@jasnell

This comment has been minimized.

Show comment
Hide comment
@jasnell

jasnell Mar 28, 2017

Member

If we turn all deprecations off by default we run into the exact same issue about most folks not wanting to turn them on. That wouldn't help much. Deprecations are always going to be annoying, which is why we should always avoid them if at all possible. There's not going to be an ideal solution here.

Member

jasnell commented Mar 28, 2017

If we turn all deprecations off by default we run into the exact same issue about most folks not wanting to turn them on. That wouldn't help much. Deprecations are always going to be annoying, which is why we should always avoid them if at all possible. There's not going to be an ideal solution here.

@mscdex

This comment has been minimized.

Show comment
Hide comment
@mscdex

mscdex Mar 28, 2017

Contributor

I personally don't see a problem with runtime deprecations since they almost always only appear as part of a new major version release. So if you're currently using an LTS branch and you test your node scripts with the next major version (or next LTS branch) and see runtime deprecations, you have plenty of time to resolve the deprecations before the current LTS branch is no longer supported.

Even if users still have issues with deprecations, I thought the original idea behind the process 'warning' event mechanism was to allow capturing/handling of these deprecations however they want (and to prevent them from printing to the console entirely, if that is the main complaint)?

Contributor

mscdex commented Mar 28, 2017

I personally don't see a problem with runtime deprecations since they almost always only appear as part of a new major version release. So if you're currently using an LTS branch and you test your node scripts with the next major version (or next LTS branch) and see runtime deprecations, you have plenty of time to resolve the deprecations before the current LTS branch is no longer supported.

Even if users still have issues with deprecations, I thought the original idea behind the process 'warning' event mechanism was to allow capturing/handling of these deprecations however they want (and to prevent them from printing to the console entirely, if that is the main complaint)?

@gibfahn

This comment has been minimized.

Show comment
Hide comment
@gibfahn

gibfahn Mar 28, 2017

Member

We could turn off all deprecations by default. People who don't care about them don't have to see them.

I suspect people who are hit by breaking changes will be quite annoyed by things suddenly breaking their production apps/modules "without warning". Telling them that they should have turned on deprecation warnings probably won't help much.

Member

gibfahn commented Mar 28, 2017

We could turn off all deprecations by default. People who don't care about them don't have to see them.

I suspect people who are hit by breaking changes will be quite annoyed by things suddenly breaking their production apps/modules "without warning". Telling them that they should have turned on deprecation warnings probably won't help much.

@cjihrig

This comment has been minimized.

Show comment
Hide comment
@cjihrig

cjihrig Mar 28, 2017

Contributor

Telling them that they should have turned on deprecation warnings probably won't help much.

That's pretty much the same scenario as this --pending-deprecations flag. By the way, I might not have been clear before. I don't mind deprecations being on. It's the printing to the console by default.

Contributor

cjihrig commented Mar 28, 2017

Telling them that they should have turned on deprecation warnings probably won't help much.

That's pretty much the same scenario as this --pending-deprecations flag. By the way, I might not have been clear before. I don't mind deprecations being on. It's the printing to the console by default.

@seishun

This comment has been minimized.

Show comment
Hide comment
@seishun

seishun Mar 29, 2017

Member

It's the printing to the console by default.

Not sure what you mean. How else could it work when there are no listeners for the 'warning' event?

I suspect people who are hit by breaking changes will be quite annoyed by things suddenly breaking their production apps/modules "without warning".

FWIW that's my concern regarding #11808. It's not breaking, but it might force many people to change their code nonetheless.

Member

seishun commented Mar 29, 2017

It's the printing to the console by default.

Not sure what you mean. How else could it work when there are no listeners for the 'warning' event?

I suspect people who are hit by breaking changes will be quite annoyed by things suddenly breaking their production apps/modules "without warning".

FWIW that's my concern regarding #11808. It's not breaking, but it might force many people to change their code nonetheless.

@mhdawson

LGTM

@jasnell

This comment has been minimized.

Show comment
Hide comment
@jasnell

jasnell Mar 31, 2017

Member

It's not a great alternative, but perhaps simply --flagged-deprecation

Member

jasnell commented Mar 31, 2017

It's not a great alternative, but perhaps simply --flagged-deprecation

jasnell added some commits Mar 11, 2017

src: add --pending-deprecation and NODE_PENDING_DEPRECATION
Command line flag and environment variable that can be used to
indicate that pending deprecations should be emitted.
buffer: add pending deprecation warning
The pending deprecation warning is off by default.
Launch the node process with --pending-deprecation
or NODE_PENDING_DEPRECATION=1 env var set.
@jasnell

This comment has been minimized.

Show comment
Hide comment
@jasnell

jasnell Mar 31, 2017

Member

Updated. @addaleax ... your Symbol.species suggestion works wonderfully. The performance hit is negligible with the approach implemented here relative to master (note that master is quite a bit slower than 7.8.x currently, but I actually think that's a V8 related issue). Once we settle on the name for the flag, this should be good to go.

Member

jasnell commented Mar 31, 2017

Updated. @addaleax ... your Symbol.species suggestion works wonderfully. The performance hit is negligible with the approach implemented here relative to master (note that master is quite a bit slower than 7.8.x currently, but I actually think that's a V8 related issue). Once we settle on the name for the flag, this should be good to go.

@addaleax

Code LGTM

@ChALkeR

This comment has been minimized.

Show comment
Hide comment
@ChALkeR

ChALkeR Mar 31, 2017

Member

@jasnell On the second thought, I don't think that not passed «commit to deprecating» means that the flag can't be named --pending-deprecation — what was meant there (or how I and probably some others who voted understood it) is some stronger form of commitment, including publically announcing now that Buffer constructor will be runtime-deprecated (e.g. in the release notes / blog posts).

I do not agree that --pending-deprecation name contradicts not making now any public announcements about runtime-deprecating Buffer in the future any more than what we currently have by Buffer(arg) being doc-deprecated.

Perhaps we can just do another vote for merging this in under the --pending-deprecation name, given that the change itself is accepted?
I.e., «the opt-in deprecation flag from nodejs/CTC#88 will be named --pending-deprecation, YES/NO/ABSTAIN».

Another possible name (duh): --opt-in-deprecate/--opt-in-deprecation.
Current list of all mentioned names:

  • --pending-deprecation
  • --warn-deprecation
  • --warn-doc-deprecation
  • --flagged-deprecation
  • --opt-in-deprecate
  • --opt-in-deprecation
Member

ChALkeR commented Mar 31, 2017

@jasnell On the second thought, I don't think that not passed «commit to deprecating» means that the flag can't be named --pending-deprecation — what was meant there (or how I and probably some others who voted understood it) is some stronger form of commitment, including publically announcing now that Buffer constructor will be runtime-deprecated (e.g. in the release notes / blog posts).

I do not agree that --pending-deprecation name contradicts not making now any public announcements about runtime-deprecating Buffer in the future any more than what we currently have by Buffer(arg) being doc-deprecated.

Perhaps we can just do another vote for merging this in under the --pending-deprecation name, given that the change itself is accepted?
I.e., «the opt-in deprecation flag from nodejs/CTC#88 will be named --pending-deprecation, YES/NO/ABSTAIN».

Another possible name (duh): --opt-in-deprecate/--opt-in-deprecation.
Current list of all mentioned names:

  • --pending-deprecation
  • --warn-deprecation
  • --warn-doc-deprecation
  • --flagged-deprecation
  • --opt-in-deprecate
  • --opt-in-deprecation
@seishun

This comment has been minimized.

Show comment
Hide comment
@seishun

seishun Mar 31, 2017

Member
--pending-deprecation
--opt-in-deprecate
--opt-in-deprecation

These imply that Buffer constructor is not already deprecated. It is, it's just not runtime-deprecated. I realize that it's a common source of confusion, but it would be better not to perpetrate it here.

--warn-deprecation

But it already warns on some deprecations. Confusing.

--warn-doc-deprecation

Implies that it warns on all doc deprecations, which it doesn't.

--flagged-deprecation

???

How about --pending-runtime-deprecation? It's long, but that's the problem with adding an intermediary stage between docs-deprecation and runtime-deprecation.

Member

seishun commented Mar 31, 2017

--pending-deprecation
--opt-in-deprecate
--opt-in-deprecation

These imply that Buffer constructor is not already deprecated. It is, it's just not runtime-deprecated. I realize that it's a common source of confusion, but it would be better not to perpetrate it here.

--warn-deprecation

But it already warns on some deprecations. Confusing.

--warn-doc-deprecation

Implies that it warns on all doc deprecations, which it doesn't.

--flagged-deprecation

???

How about --pending-runtime-deprecation? It's long, but that's the problem with adding an intermediary stage between docs-deprecation and runtime-deprecation.

@Trott

This comment has been minimized.

Show comment
Hide comment
@Trott

Trott Mar 31, 2017

Member

I don't like --warn-deprecate because it implies that if you don't use the flag, you won't get any deprecation warnings whatsoever.

The --opt-in-deprecat* suggestions work for me. So does --pending-deprecation. If it helps, pending doesn't have to mean "impending" or "imminent" even though that's how a lot of people will no-doubt interpret it. It can just mean "awaiting decision" which is arguably true about this deprecation. It's problematic (we're using language that is technically correct but not what people are likely to infer), but at least not Completely Wrong and I can live with it.

Member

Trott commented Mar 31, 2017

I don't like --warn-deprecate because it implies that if you don't use the flag, you won't get any deprecation warnings whatsoever.

The --opt-in-deprecat* suggestions work for me. So does --pending-deprecation. If it helps, pending doesn't have to mean "impending" or "imminent" even though that's how a lot of people will no-doubt interpret it. It can just mean "awaiting decision" which is arguably true about this deprecation. It's problematic (we're using language that is technically correct but not what people are likely to infer), but at least not Completely Wrong and I can live with it.

@Trott

This comment has been minimized.

Show comment
Hide comment
@Trott

Trott Mar 31, 2017

Member

If it helps with the "pending" definition thing I mentioned above, think of the common expression "patent pending". That doesn't mean a patent is definitely going to be granted. It means that a decision is pending regarding the patent. A decision will be made, but it will not necessarily be to grant the patent.

Similarly "deprecation pending" in this context means that a decision will be made about the deprecation, but the decision might be to not deprecate.

(I'm using "deprecate" and "deprecation" as shorthand for "runtime deprecate" and "runtime deprecation" here.)

Granted, this is problematic because a lot of people are likely to misunderstand. But FWIW, that's true of a lot of common terminology used in technology, notably the term "deprecated".

We should definitely use better language if we can find it. But if we can't, I would argue that "pending" is not wrong, just likely to be misunderstood. That's almost as bad as wrong, I suppose, but not quite. :-D

Member

Trott commented Mar 31, 2017

If it helps with the "pending" definition thing I mentioned above, think of the common expression "patent pending". That doesn't mean a patent is definitely going to be granted. It means that a decision is pending regarding the patent. A decision will be made, but it will not necessarily be to grant the patent.

Similarly "deprecation pending" in this context means that a decision will be made about the deprecation, but the decision might be to not deprecate.

(I'm using "deprecate" and "deprecation" as shorthand for "runtime deprecate" and "runtime deprecation" here.)

Granted, this is problematic because a lot of people are likely to misunderstand. But FWIW, that's true of a lot of common terminology used in technology, notably the term "deprecated".

We should definitely use better language if we can find it. But if we can't, I would argue that "pending" is not wrong, just likely to be misunderstood. That's almost as bad as wrong, I suppose, but not quite. :-D

@Trott

This comment has been minimized.

Show comment
Hide comment
@Trott

Trott Mar 31, 2017

Member

I'm fine with --pending-runtime-deprecation too.

Member

Trott commented Mar 31, 2017

I'm fine with --pending-runtime-deprecation too.

@ChALkeR

This comment has been minimized.

Show comment
Hide comment
@ChALkeR

ChALkeR Mar 31, 2017

Member

Ok, let's have a quick 🚲🏡 vote here.

Please edit this comment, adding your opinion for each of the flag names.
I know this is cumbersome, but it's still better than having everyone to post a comment.
/cc @nodejs/ctc

Empty No/Abstain fields are hidden to save space, please uncomment them on first use.

--pending-deprecation

Yes: @ChALkeR @Trott @jasnell @targos

--warn-deprecation

No: @ChALkeR @Trott @jasnell @targos

--warn-doc-deprecation

No: @ChALkeR @Trott @jasnell @targos

--flagged-deprecation

Yes: @ChALkeR
No: @targos
Abstain: @Trott @jasnell

--opt-in-deprecate or --opt-in-deprecation

Yes: @ChALkeR @Trott @jasnell

Abstain: @targos

--pending-runtime-deprecation

Yes: @ChALkeR @Trott @targos

--pending-warn-deprecation

No: @targos

--pending-warning


It's ok to propose new flag names right here below this line, using the template above:

Member

ChALkeR commented Mar 31, 2017

Ok, let's have a quick 🚲🏡 vote here.

Please edit this comment, adding your opinion for each of the flag names.
I know this is cumbersome, but it's still better than having everyone to post a comment.
/cc @nodejs/ctc

Empty No/Abstain fields are hidden to save space, please uncomment them on first use.

--pending-deprecation

Yes: @ChALkeR @Trott @jasnell @targos

--warn-deprecation

No: @ChALkeR @Trott @jasnell @targos

--warn-doc-deprecation

No: @ChALkeR @Trott @jasnell @targos

--flagged-deprecation

Yes: @ChALkeR
No: @targos
Abstain: @Trott @jasnell

--opt-in-deprecate or --opt-in-deprecation

Yes: @ChALkeR @Trott @jasnell

Abstain: @targos

--pending-runtime-deprecation

Yes: @ChALkeR @Trott @targos

--pending-warn-deprecation

No: @targos

--pending-warning


It's ok to propose new flag names right here below this line, using the template above:

@jasnell

This comment has been minimized.

Show comment
Hide comment
@jasnell

jasnell Apr 5, 2017

Member

@nodejs/ctc ... Given that this has enough votes to land using the --pending-deprecation name, I plan to land it Friday if there are no further objections

Member

jasnell commented Apr 5, 2017

@nodejs/ctc ... Given that this has enough votes to land using the --pending-deprecation name, I plan to land it Friday if there are no further objections

@jasnell

This comment has been minimized.

Show comment
Hide comment
@jasnell

jasnell Apr 17, 2017

Member

It's a bit later, but one final call for objections on landing this as --pending-deprecation.

Member

jasnell commented Apr 17, 2017

It's a bit later, but one final call for objections on landing this as --pending-deprecation.

@jasnell

This comment has been minimized.

Show comment
Hide comment

jasnell added a commit that referenced this pull request Apr 19, 2017

src: add --pending-deprecation and NODE_PENDING_DEPRECATION
Command line flag and environment variable that can be used to
indicate that pending deprecations should be emitted.

PR-URL: #11968
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>

jasnell added a commit that referenced this pull request Apr 19, 2017

buffer: add pending deprecation warning
The pending deprecation warning is off by default.
Launch the node process with --pending-deprecation
or NODE_PENDING_DEPRECATION=1 env var set.

PR-URL: #11968
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@jasnell

This comment has been minimized.

Show comment
Hide comment
@jasnell

jasnell Apr 19, 2017

Member

Landed in a16b570 and d2d32ea

Member

jasnell commented Apr 19, 2017

Landed in a16b570 and d2d32ea

@jasnell jasnell closed this Apr 19, 2017

@Trott Trott removed the ctc-review label Apr 24, 2017

@ChALkeR ChALkeR referenced this pull request May 4, 2017

Closed

buffer: runtime-deprecate Buffer constructor #7152

2 of 2 tasks complete

@jasnell jasnell referenced this pull request May 11, 2017

Closed

8.0.0 Release Proposal #12220

jasnell added a commit to jasnell/node that referenced this pull request May 29, 2017

2017-05-30, Version 8.0.0 (Current)
* **Async Hooks**
  * The `async_hooks` module has landed in core
    [[`4a7233c178`](nodejs@4a7233c]
    [#12892](nodejs#12892).

* **Buffer**
  * Using the `--pending-deprecation` flag will cause Node.js to emit a
    deprecation warning when using `new Buffer(num)` or `Buffer(num)`.
    [[`d2d32ea5a2`](nodejs@d2d32ea]
    [#11968](nodejs#11968).
  * `new Buffer(num)` and `Buffer(num)` will zero-fill new `Buffer` instances
    [[`7eb1b4658e`](nodejs@7eb1b46]
    [#12141](nodejs#12141).
  * Many `Buffer` methods now accept `Uint8Array` as input
    [[`beca3244e2`](nodejs@beca324]
    [#10236](nodejs#10236).

* **Child Process**
  * Argument and kill signal validations have been improved
    [[`97a77288ce`](nodejs@97a7728]
    [#12348](nodejs#12348),
    [[`d75fdd96aa`](nodejs@d75fdd9]
    [#10423](nodejs#10423).
  * Child Process methods accept `Uint8Array` as input
    [[`627ecee9ed`](nodejs@627ecee]
    [#10653](nodejs#10653).

* **Console**
  * Error events emitted when using `console` methods are now supressed.
    [[`f18e08d820`](nodejs@f18e08d]
    [#9744](nodejs#9744).

* **Dependencies**
  * The npm client has been updated to 5.0.0
    [[`3c3b36af0f`](nodejs@3c3b36a]
    [#12936](nodejs#12936).
  * V8 has been updated to 5.8 with forward ABI stability to 6.0
    [[`60d1aac8d2`](nodejs@60d1aac]
    [#12784](nodejs#12784).

* **Domains**
  * Native `Promise` instances are now `Domain` aware
    [[`84dabe8373`](nodejs@84dabe8]
    [#12489](nodejs#12489).

* **Errors**
  * We have started assigning static error codes to errors generated by Node.js.
    This has been done through multiple commits and is still a work in
    progress.

* **File System**
  * The utility class `fs.SyncWriteStream` has been deprecated
    [[`7a55e34ef4`](nodejs@7a55e34]
    [#10467](nodejs#10467).
  * The deprecated `fs.read()` string interface has been removed
    [[`3c2a9361ff`](nodejs@3c2a936]
    [#9683](nodejs#9683).

* **HTTP**
  * Improved support for userland implemented Agents
    [[`90403dd1d0`](nodejs@90403dd]
    [#11567](nodejs#11567).
  * Outgoing Cookie headers are concatenated into a single string
    [[`d3480776c7`](nodejs@d348077]
    [#11259](nodejs#11259).
  * The `httpResponse.writeHeader()` method has been deprecated
    [[`fb71ba4921`](nodejs@fb71ba4]
    [#11355](nodejs#11355).
  * New methods for accessing HTTP headers have been added to `OutgoingMessage`
    [[`3e6f1032a4`](nodejs@3e6f103]
    [#10805](nodejs#10805).

* **Lib**
  * All deprecation messages have been assigned static identifiers
    [[`5de3cf099c`](nodejs@5de3cf0]
    [#10116](nodejs#10116).
  * The legacy `linkedlist` module has been removed
    [[`84a23391f6`](nodejs@84a2339]
    [#12113](nodejs#12113).

* **N-API**
  * Experimental support for the new N-API API has been added
    [[`56e881d0b0`](nodejs@56e881d]
    [#11975](nodejs#11975).

* **Process**
  * Process warning output can be redirected to a file using the
    `--redirect-warnings` command-line argument
    [[`03e89b3ff2`](nodejs@03e89b3]
    [#10116](nodejs#10116).
  * Process warnings may now include additional detail
    [[`dd20e68b0f`](nodejs@dd20e68]
    [#12725](nodejs#12725).

* **REPL**
  * REPL magic mode has been deprecated
    [[`3f27f02da0`](nodejs@3f27f02]
    [#11599](nodejs#11599).

* **Src**
  * `NODE_MODULE_VERSION` has been updated to 57
    (nodejs@ec7cbaf]
    [#12995](nodejs#12995).
  * Add `--pending-deprecation` command-line argument and
    `NODE_PENDING_DEPRECATION` environment variable
    [[`a16b570f8c`](nodejs@a16b570]
    [#11968](nodejs#11968).
  * The `--debug` command-line argument has been deprecated. Note that
    using `--debug` will enable the *new* Inspector-based debug protocol
    as the legacy Debugger protocol previously used by Node.js has been
    removed. [[`010f864426`](nodejs@010f864]
    [#12949](nodejs#12949).
  * Throw when the `-c` and `-e` command-line arguments are used at the same
    time [[`a5f91ab230`](nodejs@a5f91ab]
    [#11689](nodejs#11689).
  * Throw when the `--use-bundled-ca` and `--use-openssl-ca` command-line
    arguments are used at the same time.
    [[`8a7db9d4b5`](nodejs@8a7db9d]
    [#12087](nodejs#12087).

* **Stream**
  * `Stream` now supports `destroy()` and `_destroy()` APIs
    [[`b6e1d22fa6`](nodejs@b6e1d22]
    [#12925](nodejs#12925).
  * `Stream` now supports the `_final()` API
    [[`07c7f198db`](nodejs@07c7f19]
    [#12828](nodejs#12828).

* **TLS**
  * The `rejectUnauthorized` option now defaults to `true`
    [[`348cc80a3c`](nodejs@348cc80]
    [#5923](nodejs#5923).
  * The `tls.createSecurePair()` API now emits a runtime deprecation
    [[`a2ae08999b`](nodejs@a2ae089]
    [#11349](nodejs#11349).
  * A runtime deprecation will now be emitted when `dhparam` is less than
    2048 bits [[`d523eb9c40`](nodejs@d523eb9]
    [#11447](nodejs#11447).

* **URL**
  * The WHATWG URL implementation is now a fully-supported Node.js API
    [[`d080ead0f9`](nodejs@d080ead]
    [#12710](nodejs#12710).

* **Util**
  * `Symbol` keys are now displayed by default when using `util.inspect()`
    [[`5bfd13b81e`](nodejs@5bfd13b]
    [#9726](nodejs#9726).
  * `toJSON` errors will be thrown when formatting `%j`
    [[`455e6f1dd8`](nodejs@455e6f1]
    [#11708](nodejs#11708).
  * Convert `inspect.styles` and `inspect.colors` to prototype-less objects
    [[`aab0d202f8`](nodejs@aab0d20]
    [#11624](nodejs#11624).
  * The new `util.promisify()` API has been added
    [[`99da8e8e02`](nodejs@99da8e8]
    [#12442](nodejs#12442).

* **Zlib**
  * Support `Uint8Array` in Zlib convenience methods
    [[`91383e47fd`](nodejs@91383e4]
    [#12001](nodejs#12001).
  * Zlib errors now use `RangeError` and `TypeError` consistently
    [[`b514bd231e`](nodejs@b514bd2]
    [#11391](nodejs#11391).

jasnell added a commit that referenced this pull request May 30, 2017

2017-05-30, Version 8.0.0 (Current)
* **Async Hooks**
  * The `async_hooks` module has landed in core
    [[`4a7233c178`](4a7233c]
    [#12892](#12892).

* **Buffer**
  * Using the `--pending-deprecation` flag will cause Node.js to emit a
    deprecation warning when using `new Buffer(num)` or `Buffer(num)`.
    [[`d2d32ea5a2`](d2d32ea]
    [#11968](#11968).
  * `new Buffer(num)` and `Buffer(num)` will zero-fill new `Buffer` instances
    [[`7eb1b4658e`](7eb1b46]
    [#12141](#12141).
  * Many `Buffer` methods now accept `Uint8Array` as input
    [[`beca3244e2`](beca324]
    [#10236](#10236).

* **Child Process**
  * Argument and kill signal validations have been improved
    [[`97a77288ce`](97a7728]
    [#12348](#12348),
    [[`d75fdd96aa`](d75fdd9]
    [#10423](#10423).
  * Child Process methods accept `Uint8Array` as input
    [[`627ecee9ed`](627ecee]
    [#10653](#10653).

* **Console**
  * Error events emitted when using `console` methods are now supressed.
    [[`f18e08d820`](f18e08d]
    [#9744](#9744).

* **Dependencies**
  * The npm client has been updated to 5.0.0
    [[`3c3b36af0f`](3c3b36a]
    [#12936](#12936).
  * V8 has been updated to 5.8 with forward ABI stability to 6.0
    [[`60d1aac8d2`](60d1aac]
    [#12784](#12784).

* **Domains**
  * Native `Promise` instances are now `Domain` aware
    [[`84dabe8373`](84dabe8]
    [#12489](#12489).

* **Errors**
  * We have started assigning static error codes to errors generated by Node.js.
    This has been done through multiple commits and is still a work in
    progress.

* **File System**
  * The utility class `fs.SyncWriteStream` has been deprecated
    [[`7a55e34ef4`](7a55e34]
    [#10467](#10467).
  * The deprecated `fs.read()` string interface has been removed
    [[`3c2a9361ff`](3c2a936]
    [#9683](#9683).

* **HTTP**
  * Improved support for userland implemented Agents
    [[`90403dd1d0`](90403dd]
    [#11567](#11567).
  * Outgoing Cookie headers are concatenated into a single string
    [[`d3480776c7`](d348077]
    [#11259](#11259).
  * The `httpResponse.writeHeader()` method has been deprecated
    [[`fb71ba4921`](fb71ba4]
    [#11355](#11355).
  * New methods for accessing HTTP headers have been added to `OutgoingMessage`
    [[`3e6f1032a4`](3e6f103]
    [#10805](#10805).

* **Lib**
  * All deprecation messages have been assigned static identifiers
    [[`5de3cf099c`](5de3cf0]
    [#10116](#10116).
  * The legacy `linkedlist` module has been removed
    [[`84a23391f6`](84a2339]
    [#12113](#12113).

* **N-API**
  * Experimental support for the new N-API API has been added
    [[`56e881d0b0`](56e881d]
    [#11975](#11975).

* **Process**
  * Process warning output can be redirected to a file using the
    `--redirect-warnings` command-line argument
    [[`03e89b3ff2`](03e89b3]
    [#10116](#10116).
  * Process warnings may now include additional detail
    [[`dd20e68b0f`](dd20e68]
    [#12725](#12725).

* **REPL**
  * REPL magic mode has been deprecated
    [[`3f27f02da0`](3f27f02]
    [#11599](#11599).

* **Src**
  * `NODE_MODULE_VERSION` has been updated to 57
    (ec7cbaf]
    [#12995](#12995).
  * Add `--pending-deprecation` command-line argument and
    `NODE_PENDING_DEPRECATION` environment variable
    [[`a16b570f8c`](a16b570]
    [#11968](#11968).
  * The `--debug` command-line argument has been deprecated. Note that
    using `--debug` will enable the *new* Inspector-based debug protocol
    as the legacy Debugger protocol previously used by Node.js has been
    removed. [[`010f864426`](010f864]
    [#12949](#12949).
  * Throw when the `-c` and `-e` command-line arguments are used at the same
    time [[`a5f91ab230`](a5f91ab]
    [#11689](#11689).
  * Throw when the `--use-bundled-ca` and `--use-openssl-ca` command-line
    arguments are used at the same time.
    [[`8a7db9d4b5`](8a7db9d]
    [#12087](#12087).

* **Stream**
  * `Stream` now supports `destroy()` and `_destroy()` APIs
    [[`b6e1d22fa6`](b6e1d22]
    [#12925](#12925).
  * `Stream` now supports the `_final()` API
    [[`07c7f198db`](07c7f19]
    [#12828](#12828).

* **TLS**
  * The `rejectUnauthorized` option now defaults to `true`
    [[`348cc80a3c`](348cc80]
    [#5923](#5923).
  * The `tls.createSecurePair()` API now emits a runtime deprecation
    [[`a2ae08999b`](a2ae089]
    [#11349](#11349).
  * A runtime deprecation will now be emitted when `dhparam` is less than
    2048 bits [[`d523eb9c40`](d523eb9]
    [#11447](#11447).

* **URL**
  * The WHATWG URL implementation is now a fully-supported Node.js API
    [[`d080ead0f9`](d080ead]
    [#12710](#12710).

* **Util**
  * `Symbol` keys are now displayed by default when using `util.inspect()`
    [[`5bfd13b81e`](5bfd13b]
    [#9726](#9726).
  * `toJSON` errors will be thrown when formatting `%j`
    [[`455e6f1dd8`](455e6f1]
    [#11708](#11708).
  * Convert `inspect.styles` and `inspect.colors` to prototype-less objects
    [[`aab0d202f8`](aab0d20]
    [#11624](#11624).
  * The new `util.promisify()` API has been added
    [[`99da8e8e02`](99da8e8]
    [#12442](#12442).

* **Zlib**
  * Support `Uint8Array` in Zlib convenience methods
    [[`91383e47fd`](91383e4]
    [#12001](#12001).
  * Zlib errors now use `RangeError` and `TypeError` consistently
    [[`b514bd231e`](b514bd2]
    [#11391](#11391).

jasnell added a commit that referenced this pull request May 30, 2017

2017-05-30, Version 8.0.0 (Current)
* **Async Hooks**
  * The `async_hooks` module has landed in core
    [[`4a7233c178`](4a7233c)]
    [#12892](#12892).

* **Buffer**
  * Using the `--pending-deprecation` flag will cause Node.js to emit a
    deprecation warning when using `new Buffer(num)` or `Buffer(num)`.
    [[`d2d32ea5a2`](d2d32ea)]
    [#11968](#11968).
  * `new Buffer(num)` and `Buffer(num)` will zero-fill new `Buffer` instances
    [[`7eb1b4658e`](7eb1b46)]
    [#12141](#12141).
  * Many `Buffer` methods now accept `Uint8Array` as input
    [[`beca3244e2`](beca324)]
    [#10236](#10236).

* **Child Process**
  * Argument and kill signal validations have been improved
    [[`97a77288ce`](97a7728)]
    [#12348](#12348),
    [[`d75fdd96aa`](d75fdd9)]
    [#10423](#10423).
  * Child Process methods accept `Uint8Array` as input
    [[`627ecee9ed`](627ecee)]
    [#10653](#10653).

* **Console**
  * Error events emitted when using `console` methods are now supressed.
    [[`f18e08d820`](f18e08d)]
    [#9744](#9744).

* **Dependencies**
  * The npm client has been updated to 5.0.0
    [[`3c3b36af0f`](3c3b36a)]
    [#12936](#12936).
  * V8 has been updated to 5.8 with forward ABI stability to 6.0
    [[`60d1aac8d2`](60d1aac)]
    [#12784](#12784).

* **Domains**
  * Native `Promise` instances are now `Domain` aware
    [[`84dabe8373`](84dabe8)]
    [#12489](#12489).

* **Errors**
  * We have started assigning static error codes to errors generated by Node.js.
    This has been done through multiple commits and is still a work in
    progress.

* **File System**
  * The utility class `fs.SyncWriteStream` has been deprecated
    [[`7a55e34ef4`](7a55e34)]
    [#10467](#10467).
  * The deprecated `fs.read()` string interface has been removed
    [[`3c2a9361ff`](3c2a936)]
    [#9683](#9683).

* **HTTP**
  * Improved support for userland implemented Agents
    [[`90403dd1d0`](90403dd)]
    [#11567](#11567).
  * Outgoing Cookie headers are concatenated into a single string
    [[`d3480776c7`](d348077)]
    [#11259](#11259).
  * The `httpResponse.writeHeader()` method has been deprecated
    [[`fb71ba4921`](fb71ba4)]
    [#11355](#11355).
  * New methods for accessing HTTP headers have been added to `OutgoingMessage`
    [[`3e6f1032a4`](3e6f103)]
    [#10805](#10805).

* **Lib**
  * All deprecation messages have been assigned static identifiers
    [[`5de3cf099c`](5de3cf0)]
    [#10116](#10116).
  * The legacy `linkedlist` module has been removed
    [[`84a23391f6`](84a2339)]
    [#12113](#12113).

* **N-API**
  * Experimental support for the new N-API API has been added
    [[`56e881d0b0`](56e881d)]
    [#11975](#11975).

* **Process**
  * Process warning output can be redirected to a file using the
    `--redirect-warnings` command-line argument
    [[`03e89b3ff2`](03e89b3)]
    [#10116](#10116).
  * Process warnings may now include additional detail
    [[`dd20e68b0f`](dd20e68)]
    [#12725](#12725).

* **REPL**
  * REPL magic mode has been deprecated
    [[`3f27f02da0`](3f27f02)]
    [#11599](#11599).

* **Src**
  * `NODE_MODULE_VERSION` has been updated to 57
    (ec7cbaf)]
    [#12995](#12995).
  * Add `--pending-deprecation` command-line argument and
    `NODE_PENDING_DEPRECATION` environment variable
    [[`a16b570f8c`](a16b570)]
    [#11968](#11968).
  * The `--debug` command-line argument has been deprecated. Note that
    using `--debug` will enable the *new* Inspector-based debug protocol
    as the legacy Debugger protocol previously used by Node.js has been
    removed. [[`010f864426`](010f864)]
    [#12949](#12949).
  * Throw when the `-c` and `-e` command-line arguments are used at the same
    time [[`a5f91ab230`](a5f91ab)]
    [#11689](#11689).
  * Throw when the `--use-bundled-ca` and `--use-openssl-ca` command-line
    arguments are used at the same time.
    [[`8a7db9d4b5`](8a7db9d)]
    [#12087](#12087).

* **Stream**
  * `Stream` now supports `destroy()` and `_destroy()` APIs
    [[`b6e1d22fa6`](b6e1d22)]
    [#12925](#12925).
  * `Stream` now supports the `_final()` API
    [[`07c7f198db`](07c7f19)]
    [#12828](#12828).

* **TLS**
  * The `rejectUnauthorized` option now defaults to `true`
    [[`348cc80a3c`](348cc80)]
    [#5923](#5923).
  * The `tls.createSecurePair()` API now emits a runtime deprecation
    [[`a2ae08999b`](a2ae089)]
    [#11349](#11349).
  * A runtime deprecation will now be emitted when `dhparam` is less than
    2048 bits [[`d523eb9c40`](d523eb9)]
    [#11447](#11447).

* **URL**
  * The WHATWG URL implementation is now a fully-supported Node.js API
    [[`d080ead0f9`](d080ead)]
    [#12710](#12710).

* **Util**
  * `Symbol` keys are now displayed by default when using `util.inspect()`
    [[`5bfd13b81e`](5bfd13b)]
    [#9726](#9726).
  * `toJSON` errors will be thrown when formatting `%j`
    [[`455e6f1dd8`](455e6f1)]
    [#11708](#11708).
  * Convert `inspect.styles` and `inspect.colors` to prototype-less objects
    [[`aab0d202f8`](aab0d20)]
    [#11624](#11624).
  * The new `util.promisify()` API has been added
    [[`99da8e8e02`](99da8e8)]
    [#12442](#12442).

* **Zlib**
  * Support `Uint8Array` in Zlib convenience methods
    [[`91383e47fd`](91383e4)]
    [#12001](#12001).
  * Zlib errors now use `RangeError` and `TypeError` consistently
    [[`b514bd231e`](b514bd2)]
    [#11391](#11391).

@gibfahn gibfahn referenced this pull request Jun 18, 2017

Closed

test: check that pending warning is emitted once #12527

3 of 3 tasks complete

@seishun seishun referenced this pull request Sep 11, 2017

Closed

buffer: runtime-deprecate Buffer ctor by default #15346

3 of 4 tasks complete

gabrielschulhof added a commit to gabrielschulhof/node that referenced this pull request Mar 12, 2018

2017-05-30, Version 8.0.0 (Current)
* **Async Hooks**
  * The `async_hooks` module has landed in core
    [[`4a7233c178`](nodejs@4a7233c)]
    [#12892](nodejs#12892).

* **Buffer**
  * Using the `--pending-deprecation` flag will cause Node.js to emit a
    deprecation warning when using `new Buffer(num)` or `Buffer(num)`.
    [[`d2d32ea5a2`](nodejs@d2d32ea)]
    [#11968](nodejs#11968).
  * `new Buffer(num)` and `Buffer(num)` will zero-fill new `Buffer` instances
    [[`7eb1b4658e`](nodejs@7eb1b46)]
    [#12141](nodejs#12141).
  * Many `Buffer` methods now accept `Uint8Array` as input
    [[`beca3244e2`](nodejs@beca324)]
    [#10236](nodejs#10236).

* **Child Process**
  * Argument and kill signal validations have been improved
    [[`97a77288ce`](nodejs@97a7728)]
    [#12348](nodejs#12348),
    [[`d75fdd96aa`](nodejs@d75fdd9)]
    [#10423](nodejs#10423).
  * Child Process methods accept `Uint8Array` as input
    [[`627ecee9ed`](nodejs@627ecee)]
    [#10653](nodejs#10653).

* **Console**
  * Error events emitted when using `console` methods are now supressed.
    [[`f18e08d820`](nodejs@f18e08d)]
    [#9744](nodejs#9744).

* **Dependencies**
  * The npm client has been updated to 5.0.0
    [[`3c3b36af0f`](nodejs@3c3b36a)]
    [#12936](nodejs#12936).
  * V8 has been updated to 5.8 with forward ABI stability to 6.0
    [[`60d1aac8d2`](nodejs@60d1aac)]
    [#12784](nodejs#12784).

* **Domains**
  * Native `Promise` instances are now `Domain` aware
    [[`84dabe8373`](nodejs@84dabe8)]
    [#12489](nodejs#12489).

* **Errors**
  * We have started assigning static error codes to errors generated by Node.js.
    This has been done through multiple commits and is still a work in
    progress.

* **File System**
  * The utility class `fs.SyncWriteStream` has been deprecated
    [[`7a55e34ef4`](nodejs@7a55e34)]
    [#10467](nodejs#10467).
  * The deprecated `fs.read()` string interface has been removed
    [[`3c2a9361ff`](nodejs@3c2a936)]
    [#9683](nodejs#9683).

* **HTTP**
  * Improved support for userland implemented Agents
    [[`90403dd1d0`](nodejs@90403dd)]
    [#11567](nodejs#11567).
  * Outgoing Cookie headers are concatenated into a single string
    [[`d3480776c7`](nodejs@d348077)]
    [#11259](nodejs#11259).
  * The `httpResponse.writeHeader()` method has been deprecated
    [[`fb71ba4921`](nodejs@fb71ba4)]
    [#11355](nodejs#11355).
  * New methods for accessing HTTP headers have been added to `OutgoingMessage`
    [[`3e6f1032a4`](nodejs@3e6f103)]
    [#10805](nodejs#10805).

* **Lib**
  * All deprecation messages have been assigned static identifiers
    [[`5de3cf099c`](nodejs@5de3cf0)]
    [#10116](nodejs#10116).
  * The legacy `linkedlist` module has been removed
    [[`84a23391f6`](nodejs@84a2339)]
    [#12113](nodejs#12113).

* **N-API**
  * Experimental support for the new N-API API has been added
    [[`56e881d0b0`](nodejs@56e881d)]
    [#11975](nodejs#11975).

* **Process**
  * Process warning output can be redirected to a file using the
    `--redirect-warnings` command-line argument
    [[`03e89b3ff2`](nodejs@03e89b3)]
    [#10116](nodejs#10116).
  * Process warnings may now include additional detail
    [[`dd20e68b0f`](nodejs@dd20e68)]
    [#12725](nodejs#12725).

* **REPL**
  * REPL magic mode has been deprecated
    [[`3f27f02da0`](nodejs@3f27f02)]
    [#11599](nodejs#11599).

* **Src**
  * `NODE_MODULE_VERSION` has been updated to 57
    (nodejs@ec7cbaf)]
    [#12995](nodejs#12995).
  * Add `--pending-deprecation` command-line argument and
    `NODE_PENDING_DEPRECATION` environment variable
    [[`a16b570f8c`](nodejs@a16b570)]
    [#11968](nodejs#11968).
  * The `--debug` command-line argument has been deprecated. Note that
    using `--debug` will enable the *new* Inspector-based debug protocol
    as the legacy Debugger protocol previously used by Node.js has been
    removed. [[`010f864426`](nodejs@010f864)]
    [#12949](nodejs#12949).
  * Throw when the `-c` and `-e` command-line arguments are used at the same
    time [[`a5f91ab230`](nodejs@a5f91ab)]
    [#11689](nodejs#11689).
  * Throw when the `--use-bundled-ca` and `--use-openssl-ca` command-line
    arguments are used at the same time.
    [[`8a7db9d4b5`](nodejs@8a7db9d)]
    [#12087](nodejs#12087).

* **Stream**
  * `Stream` now supports `destroy()` and `_destroy()` APIs
    [[`b6e1d22fa6`](nodejs@b6e1d22)]
    [#12925](nodejs#12925).
  * `Stream` now supports the `_final()` API
    [[`07c7f198db`](nodejs@07c7f19)]
    [#12828](nodejs#12828).

* **TLS**
  * The `rejectUnauthorized` option now defaults to `true`
    [[`348cc80a3c`](nodejs@348cc80)]
    [#5923](nodejs#5923).
  * The `tls.createSecurePair()` API now emits a runtime deprecation
    [[`a2ae08999b`](nodejs@a2ae089)]
    [#11349](nodejs#11349).
  * A runtime deprecation will now be emitted when `dhparam` is less than
    2048 bits [[`d523eb9c40`](nodejs@d523eb9)]
    [#11447](nodejs#11447).

* **URL**
  * The WHATWG URL implementation is now a fully-supported Node.js API
    [[`d080ead0f9`](nodejs@d080ead)]
    [#12710](nodejs#12710).

* **Util**
  * `Symbol` keys are now displayed by default when using `util.inspect()`
    [[`5bfd13b81e`](nodejs@5bfd13b)]
    [#9726](nodejs#9726).
  * `toJSON` errors will be thrown when formatting `%j`
    [[`455e6f1dd8`](nodejs@455e6f1)]
    [#11708](nodejs#11708).
  * Convert `inspect.styles` and `inspect.colors` to prototype-less objects
    [[`aab0d202f8`](nodejs@aab0d20)]
    [#11624](nodejs#11624).
  * The new `util.promisify()` API has been added
    [[`99da8e8e02`](nodejs@99da8e8)]
    [#12442](nodejs#12442).

* **Zlib**
  * Support `Uint8Array` in Zlib convenience methods
    [[`91383e47fd`](nodejs@91383e4)]
    [#12001](nodejs#12001).
  * Zlib errors now use `RangeError` and `TypeError` consistently
    [[`b514bd231e`](nodejs@b514bd2)]
    [#11391](nodejs#11391).

This applies parts of 43e4efd that are
relevant to N-API.

gabrielschulhof added a commit to gabrielschulhof/node that referenced this pull request Mar 15, 2018

2017-05-30, Version 8.0.0 (Current)
* **Async Hooks**
  * The `async_hooks` module has landed in core
    [[`4a7233c178`](nodejs@4a7233c]
    [#12892](nodejs#12892).

* **Buffer**
  * Using the `--pending-deprecation` flag will cause Node.js to emit a
    deprecation warning when using `new Buffer(num)` or `Buffer(num)`.
    [[`d2d32ea5a2`](nodejs@d2d32ea]
    [#11968](nodejs#11968).
  * `new Buffer(num)` and `Buffer(num)` will zero-fill new `Buffer` instances
    [[`7eb1b4658e`](nodejs@7eb1b46]
    [#12141](nodejs#12141).
  * Many `Buffer` methods now accept `Uint8Array` as input
    [[`beca3244e2`](nodejs@beca324]
    [#10236](nodejs#10236).

* **Child Process**
  * Argument and kill signal validations have been improved
    [[`97a77288ce`](nodejs@97a7728]
    [#12348](nodejs#12348),
    [[`d75fdd96aa`](nodejs@d75fdd9]
    [#10423](nodejs#10423).
  * Child Process methods accept `Uint8Array` as input
    [[`627ecee9ed`](nodejs@627ecee]
    [#10653](nodejs#10653).

* **Console**
  * Error events emitted when using `console` methods are now supressed.
    [[`f18e08d820`](nodejs@f18e08d]
    [#9744](nodejs#9744).

* **Dependencies**
  * The npm client has been updated to 5.0.0
    [[`3c3b36af0f`](nodejs@3c3b36a]
    [#12936](nodejs#12936).
  * V8 has been updated to 5.8 with forward ABI stability to 6.0
    [[`60d1aac8d2`](nodejs@60d1aac]
    [#12784](nodejs#12784).

* **Domains**
  * Native `Promise` instances are now `Domain` aware
    [[`84dabe8373`](nodejs@84dabe8]
    [#12489](nodejs#12489).

* **Errors**
  * We have started assigning static error codes to errors generated by Node.js.
    This has been done through multiple commits and is still a work in
    progress.

* **File System**
  * The utility class `fs.SyncWriteStream` has been deprecated
    [[`7a55e34ef4`](nodejs@7a55e34]
    [#10467](nodejs#10467).
  * The deprecated `fs.read()` string interface has been removed
    [[`3c2a9361ff`](nodejs@3c2a936]
    [#9683](nodejs#9683).

* **HTTP**
  * Improved support for userland implemented Agents
    [[`90403dd1d0`](nodejs@90403dd]
    [#11567](nodejs#11567).
  * Outgoing Cookie headers are concatenated into a single string
    [[`d3480776c7`](nodejs@d348077]
    [#11259](nodejs#11259).
  * The `httpResponse.writeHeader()` method has been deprecated
    [[`fb71ba4921`](nodejs@fb71ba4]
    [#11355](nodejs#11355).
  * New methods for accessing HTTP headers have been added to `OutgoingMessage`
    [[`3e6f1032a4`](nodejs@3e6f103]
    [#10805](nodejs#10805).

* **Lib**
  * All deprecation messages have been assigned static identifiers
    [[`5de3cf099c`](nodejs@5de3cf0]
    [#10116](nodejs#10116).
  * The legacy `linkedlist` module has been removed
    [[`84a23391f6`](nodejs@84a2339]
    [#12113](nodejs#12113).

* **N-API**
  * Experimental support for the new N-API API has been added
    [[`56e881d0b0`](nodejs@56e881d]
    [#11975](nodejs#11975).

* **Process**
  * Process warning output can be redirected to a file using the
    `--redirect-warnings` command-line argument
    [[`03e89b3ff2`](nodejs@03e89b3]
    [#10116](nodejs#10116).
  * Process warnings may now include additional detail
    [[`dd20e68b0f`](nodejs@dd20e68]
    [#12725](nodejs#12725).

* **REPL**
  * REPL magic mode has been deprecated
    [[`3f27f02da0`](nodejs@3f27f02]
    [#11599](nodejs#11599).

* **Src**
  * `NODE_MODULE_VERSION` has been updated to 57
    (nodejs@ec7cbaf]
    [#12995](nodejs#12995).
  * Add `--pending-deprecation` command-line argument and
    `NODE_PENDING_DEPRECATION` environment variable
    [[`a16b570f8c`](nodejs@a16b570]
    [#11968](nodejs#11968).
  * The `--debug` command-line argument has been deprecated. Note that
    using `--debug` will enable the *new* Inspector-based debug protocol
    as the legacy Debugger protocol previously used by Node.js has been
    removed. [[`010f864426`](nodejs@010f864]
    [#12949](nodejs#12949).
  * Throw when the `-c` and `-e` command-line arguments are used at the same
    time [[`a5f91ab230`](nodejs@a5f91ab]
    [#11689](nodejs#11689).
  * Throw when the `--use-bundled-ca` and `--use-openssl-ca` command-line
    arguments are used at the same time.
    [[`8a7db9d4b5`](nodejs@8a7db9d]
    [#12087](nodejs#12087).

* **Stream**
  * `Stream` now supports `destroy()` and `_destroy()` APIs
    [[`b6e1d22fa6`](nodejs@b6e1d22]
    [#12925](nodejs#12925).
  * `Stream` now supports the `_final()` API
    [[`07c7f198db`](nodejs@07c7f19]
    [#12828](nodejs#12828).

* **TLS**
  * The `rejectUnauthorized` option now defaults to `true`
    [[`348cc80a3c`](nodejs@348cc80]
    [#5923](nodejs#5923).
  * The `tls.createSecurePair()` API now emits a runtime deprecation
    [[`a2ae08999b`](nodejs@a2ae089]
    [#11349](nodejs#11349).
  * A runtime deprecation will now be emitted when `dhparam` is less than
    2048 bits [[`d523eb9c40`](nodejs@d523eb9]
    [#11447](nodejs#11447).

* **URL**
  * The WHATWG URL implementation is now a fully-supported Node.js API
    [[`d080ead0f9`](nodejs@d080ead]
    [#12710](nodejs#12710).

* **Util**
  * `Symbol` keys are now displayed by default when using `util.inspect()`
    [[`5bfd13b81e`](nodejs@5bfd13b]
    [#9726](nodejs#9726).
  * `toJSON` errors will be thrown when formatting `%j`
    [[`455e6f1dd8`](nodejs@455e6f1]
    [#11708](nodejs#11708).
  * Convert `inspect.styles` and `inspect.colors` to prototype-less objects
    [[`aab0d202f8`](nodejs@aab0d20]
    [#11624](nodejs#11624).
  * The new `util.promisify()` API has been added
    [[`99da8e8e02`](nodejs@99da8e8]
    [#12442](nodejs#12442).

* **Zlib**
  * Support `Uint8Array` in Zlib convenience methods
    [[`91383e47fd`](nodejs@91383e4]
    [#12001](nodejs#12001).
  * Zlib errors now use `RangeError` and `TypeError` consistently
    [[`b514bd231e`](nodejs@b514bd2]
    [#11391](nodejs#11391).

This applies parts of 43e4efd that are
relevant to N-API.

@ChALkeR ChALkeR referenced this pull request Jul 11, 2018

Open

Password Hashing API #21766

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