| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
CI: https://ci.nodejs.org/job/node-test-commit/9508/ Edit: CI failures are infra-related, CITGM compares good to master /cc @nodejs/streams |
Sorry, something went wrong.
There was a problem hiding this comment.
Nit: how about only incrementing inside to avoid incrementing when unnecessary? Or just use a boolean?
Sorry, something went wrong.
There was a problem hiding this comment.
@mscdex I’m fine either way, updated this to switch to a boolean
Sorry, something went wrong.
There was a problem hiding this comment.
Changes LGTM assuming CI and CITGM are green, we might want to mark this as semver-minor for safety reasons as it changes stream behavior.
Sorry, something went wrong.
Not sure, it isn’t really adding anything … if you think it’s a change that should be pointed out explicitly, then adding notable-change sounds better. But really, this is a very very niche use case that’s being fixed, even for streams… |
Sorry, something went wrong.
|
Wanna just discuss this at the face to face this week?
…On Sat, Apr 29, 2017, 3:40 PM Anna Henningsen ***@***.***> wrote:
we might want to mark this as semver-minor for safety reasons as it
changes stream behavior
Not sure, it isn’t really adding anything … if you think it’s a change
that should be pointed out explicitly, then adding notable-change sounds
better. But really, this is a very very niche use case that’s being fixed,
even for streams…
—
You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub
<#12746 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABE4nxSRpld7Miewyr6PQxWfxpH0wWcSks5r05JHgaJpZM4NMV5N>
.
|
Sorry, something went wrong.
|
@calvinmetcalf I mean, sure, if you think that that makes anything easier, we can talk in person … but it might be good to know what you’d like to discuss? 😄 |
Sorry, something went wrong.
|
Whether this is semver minor or not
…On Sun, Apr 30, 2017, 10:22 AM Anna Henningsen ***@***.***> wrote:
@calvinmetcalf <https://github.com/calvinmetcalf> I mean, sure, if you
think that that makes anything easier, we can talk in person … but it might
be good to know what you’d like to discuss? 😄
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#12746 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABE4n3-mSiFqWW2aSkM7sWLRHM6CgGAiks5r1Jk9gaJpZM4NMV5N>
.
|
Sorry, something went wrong.
|
Sure … but I don’t have a problem discussing it here, either. I know the streams WG has a good chance of being quite complete in Berlin, but there might be other people with thoughts on this that can’t make it there. (That doesn’t mean we can’t talk about it in person if we don’t come to a conclusion here). I would say that this is semver-patch, because it fixes a bug; the current behaviour is definitely broken (or needs to be document as something that’s just fundamentally not supported), and this is a way to make the behaviour at least consistent in a way that would match my expectations as a streams user, and presumably @ovikholt’s expectations, too. I would say that this is not semver-major because the edge case that is affected by this change would just be broken before, so there’s no reason to believe anybody relies on it. I would say that this is not semver-minor because it doesn’t add a feature to the API. It does add another parameter to an event callback, but one that’s for internal use, that’s intentionally undocumented and that userland applications won’t really be able to use. I wish there would be an easier way to hide it, but I don’t see any (at least as long as we’re also talking about solutions that include all environments supported by readable-stream). If we want to be careful, then landing it in current and waiting a reasonably long time before backporting it to LTS seems like a better approach than assigning it a semver level out of caution. |
Sorry, something went wrong.
|
I'm not convinced of this PR. I think y.pipe(x); y.pipe(x); should be discouraged, and I am wondering why it was supported in the first place. Maybe we should stop supporting piping the same stream multiple times to the same destination, but that would be a semver-major change. Would you mind adding a test that does y.pipe(x); y.pipe(x); y.unpipe(x); y.unpipe(x); and check that everything is still in order? |
Sorry, something went wrong.
I agree, supporting that is odd (especially for non-object mode) and we should consider un-supporting it. Are you okay with this change as a bugfix, though?
Done! |
Sorry, something went wrong.
Yes, I'm ok as being a backportable bugfix. We can aim to port this to lts as well. |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
|
Just one nit, can you amend the commit and the title to the PR to y.pipe(x)+y.pipe(x)+y.unpipe(x), as otherwise I've read it wrongly the first time y.pipe(x).pipe(x).unpipe(x), which has a completely different meaning. |
Sorry, something went wrong.
Fix the uncommon situation when a readable stream is piped twice into the same destination stream, and then unpiped once. Previously, the `unpipe` event handlers weren’t able to tell whether they were corresponding to the “right” conceptual pipe that was being removed; this fixes this by adding a counter to the `unpipe` event handler and only removing a single piping destination at most. Fixes: nodejs#12718
Done! |
Sorry, something went wrong.
|
Fantastic, you can go ahead and merge this for me. @calvinmetcalf have you got any other concerns? |
Sorry, something went wrong.
|
no I'm all set
…On Tue, May 2, 2017 at 5:03 PM Matteo Collina ***@***.***> wrote:
Fantastic, you can go ahead and merge this for me. @calvinmetcalf
<https://github.com/calvinmetcalf> have you got any other concerns?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#12746 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABE4n-jc2r-U1O3O80P8yYh-TBj0Pameks5r10WvgaJpZM4NMV5N>
.
|
Sorry, something went wrong.
|
Landed in 6993eb0 This is streams code and a very edge-case-y thing, so it might be good to let it sit in Current for a while before backporting. |
Sorry, something went wrong.
Fix the uncommon situation when a readable stream is piped twice into the same destination stream, and then unpiped once. Previously, the `unpipe` event handlers weren’t able to tell whether they were corresponding to the “right” conceptual pipe that was being removed; this fixes this by adding a counter to the `unpipe` event handler and only removing a single piping destination at most. Fixes: #12718 PR-URL: #12746 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Fix the uncommon situation when a readable stream is piped twice into the same destination stream, and then unpiped once. Previously, the `unpipe` event handlers weren’t able to tell whether they were corresponding to the “right” conceptual pipe that was being removed; this fixes this by adding a counter to the `unpipe` event handler and only removing a single piping destination at most. Fixes: nodejs#12718 PR-URL: nodejs#12746 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
This PR makes sure the object emitted as the 'unpipe' event in the destination stream is not shared between destination, as it would be muted. Refs: #12746 PR-URL: #18266 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Anna Henningsen <anna@addaleax.net>
This PR makes sure the object emitted as the 'unpipe' event in the destination stream is not shared between destination, as it would be muted. Refs: #12746 PR-URL: #18266 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Anna Henningsen <anna@addaleax.net>
This PR makes sure the object emitted as the 'unpipe' event in the destination stream is not shared between destination, as it would be muted. Refs: #12746 PR-URL: #18266 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Anna Henningsen <anna@addaleax.net>
This PR makes sure the object emitted as the 'unpipe' event in the destination stream is not shared between destination, as it would be muted. Refs: #12746 PR-URL: #18266 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Anna Henningsen <anna@addaleax.net>
This PR makes sure the object emitted as the 'unpipe' event in the destination stream is not shared between destination, as it would be muted. Refs: #12746 PR-URL: #18266 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Anna Henningsen <anna@addaleax.net>
|
@MylesBorins any reason to not backport this to v6.x? |
Sorry, something went wrong.
|
I think backporting both should be fine by now, it’s been almost a year. :) |
Sorry, something went wrong.
|
+1 for backporting both. |
Sorry, something went wrong.
|
@lpinca done 🎉 Will report back if there is any weirdness |
Sorry, something went wrong.
Fix the uncommon situation when a readable stream is piped twice into the same destination stream, and then unpiped once. Previously, the `unpipe` event handlers weren’t able to tell whether they were corresponding to the “right” conceptual pipe that was being removed; this fixes this by adding a counter to the `unpipe` event handler and only removing a single piping destination at most. Fixes: #12718 PR-URL: #12746 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
This PR makes sure the object emitted as the 'unpipe' event in the destination stream is not shared between destination, as it would be muted. Refs: #12746 PR-URL: #18266 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Anna Henningsen <anna@addaleax.net>
This PR makes sure the object emitted as the 'unpipe' event in the destination stream is not shared between destination, as it would be muted. Refs: nodejs#12746 PR-URL: nodejs#18266 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Anna Henningsen <anna@addaleax.net>
| Back | FazBrowse Home | New Git URL |
Fix the uncommon situation when a readable stream is piped twice into
the same destination stream, and then unpiped once.
Previously, the unpipe event handlers weren’t able to tell whether
they were corresponding to the “right” conceptual pipe that was being
removed; this fixes this by adding a counter to the unpipe event
handler and only removing a single piping destination at most.
Fixes: #12718
Checklist
Affected core subsystem(s)
stream