Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.4k
tty: remove NODE_TTY_UNSAFE_ASYNC#10393
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
Fishrock123 commented Dec 21, 2016 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
Nothing but trouble can ever come from it.
cjihrig left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally, LGTM. Not sure how much it's used, if at all.
jasnell left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should go through a proper deprecation cycle
Fishrock123 commented Dec 23, 2016
We should just deprecate it in v7, if anyone is actually going to yell about this I'd prefer to know now rather than in 6 months. |
jasnell commented Dec 24, 2016
@nodejs/ctc ... please weigh in on this! |
Trott commented Dec 24, 2016
@jasnell Did your deprecation policy ever land? If we don't have a deprecation policy, let's get one. If we have a deprecation policy, we should follow it. And if we feel like there are situations where it should be ignored, then we should change it. It shouldn't be treated as an advisory document. It should be treated as a contract with Node.js users. |
jasnell commented Dec 24, 2016
Nope, not yet, but we need to get going on it. |
ChALkeR commented Dec 25, 2016
No traces of Also, https://github.com/search?l=JavaScript&q=NODE_TTY_UNSAFE_ASYNC&type=Code doesn't show any real uses. |
addaleax commented Dec 25, 2016
There is virtually no difference in guaranteed behaviour here, so removing the env var barely qualifies as |
jasnell commented Dec 26, 2016
given @ChALkeR's search results, I'm +1 on getting the deprecation into v7 and removing in v8. |
targos commented Dec 26, 2016
I don't think usage of runtime env variables in JS files is a good metric. It's the kind of options that you will more likely find in deployment scripts or config files. That said, I'm also +1 on removing in v8. |
Fishrock123 commented Jan 3, 2017
We could "remove" it in a minor, but it would have to be a no-op. |
addaleax commented Jan 3, 2017
I’m not sure I understand… is there a difference between making the flag a no-op and just removing any behaviour that was behind it? |
Fishrock123 commented Jan 5, 2017
@addaleax Yeah, if we don't parse the flag node will exit if it is passed. :/ |
targos commented Jan 5, 2017
But that's not a flag. It's just an environment variable. |
Fishrock123 commented Jan 5, 2017
Oh, of course. Whoops >_< |
evanlucas commented Jan 31, 2017
I'm +1 for removing it, I just am unsure if it should be removed in v7.x as opposed to waiting for v8.x. To be on the safe side, I think we should wait until v8.x to remove, but possibly add a runtime deprecation to it in v7.x? We definitely need a way to communicate changes that we want to make like this to the ecosystem without disruption. This one is particularly difficult due to this being something that would probably be more used in services more so than in packages (imo). |
mhdawson commented Jan 31, 2017
I'm +1 on getting the deprecation into v7 and removing in v8. |
bnoordhuis commented Feb 1, 2017
+1 on removing.
Agreed. |
jasnell commented Feb 1, 2017
I'd still prefer for this to go through a proper deprecation cycle but I'll switch my objection to a -0. |
misterdjules commented Feb 7, 2017
I would also prefer this to go through a proper deprecation cycle, so I'm -1 on this change. As @evanlucas said better than I could:
|
addaleax commented Feb 7, 2017
Honestly, adding a runtime deprecation would be so much more disruptive than just dropping this feature completely… And I’m not sure it’s clear to everyone, but just in case, I’ll expand on my comment above: |
| // even though it was originally intended to change in v1.0.2 (Libuv 1.2.1). | ||
| // Ref: https://github.com/nodejs/node/pull/1771#issuecomment-119351671 | ||
| this._handle.setBlocking(process.env.NODE_TTY_UNSAFE_ASYNC!=='1'); | ||
| this._handle.setBlocking(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Fishrock123 Why do we do this here, for all TTY streams? Shouldn’t we just do it for process.stderr/process.stdin?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bump @Fishrock123 … actually came here to comment exactly what I had written above and saw I already did that 😄
rvagg commented Feb 8, 2017
I agree with @addaleax' last comment, so +1 from me, however I would prefer more if we just did a proper deprecation cycle and I don't see how that could be more disruptive, we just add a check for the env var being set to |
bnoordhuis left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Just reaffirming my +1 from further up so it shows in the sidebar. PR needs a rebase though.)
jasnell commented Mar 22, 2017
@Fishrock123 ... how do you want to proceed on this one? Either way it needs a rebase |
addaleax commented Mar 27, 2017
picked this up @ #12057 |
jasnell commented Mar 27, 2017
Will go ahead and close this in favor of the new PR |
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
tty
Description of change
Nothing but trouble can ever come from it.
Refs: #10157 (comment)
Edit: I should mention that anyone can still use
setBlocking(false)to get this behavior back if they really desire.