Skip to content

Conversation

@JungMinu
Copy link
Member

@JungMinuJungMinu commented Aug 9, 2016

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

repl, util

Description of change

\n is not enough for Linux with some custom stream
add carriage returns to ensure that the output is displayed correctly
using \r\n should not be a problem, even on non-Windows platforms.

Fixes: #7954

@nodejs-github-botnodejs-github-bot added repl Issues and PRs related to the REPL subsystem. util Issues and PRs related to the built-in util module. labels Aug 9, 2016
@JungMinuJungMinu self-assigned this Aug 9, 2016
@JungMinu
Copy link
MemberAuthor

JungMinu commented Aug 9, 2016

@addaleax
Copy link
Member

I guess this looks okay (and semver-major-y?) but tbh I didn’t really understand the problem it is supposed to solve… usually TTYs should have their ONLCR flag set by default, translating \n to \r\n?

@mscdex
Copy link
Contributor

@addaleax I'm not sure why it was happening that way, but that is the problem I was running into with a module I wrote.

@JungMinu
Copy link
MemberAuthor

@mscdex PTAL, LGTY?

@mscdex
Copy link
Contributor

There are still various places that still only use \n, especially anything that is written to the outputStream.

@JungMinu
Copy link
MemberAuthor

@mscdex Done, PTAL again :)

@JungMinu
Copy link
MemberAuthor

@mscdex If LGTY, I will run a new CI

@Fishrock123
Copy link
Contributor

Would it bet better to use os.EOL for this?

@addaleax
Copy link
Member

See #7954 (comment) … so, apparently no, but I’d still really like to understand what the real problem here is that this is trying to solve.

@JungMinu
Copy link
MemberAuthor

gentle ping @mscdex

@mscdex
Copy link
Contributor

I think that should do it. LGTM if CI is ok with it.

@JungMinu
Copy link
MemberAuthor

@JungMinu
Copy link
MemberAuthor

CI is green :)

`\n` is not enough for Linux with some custom stream add carriage returns to ensure that the output is displayed correctly using `\r\n` should not be a problem, even on non-Windows platforms. Fixes: #7954 PR-URL: #8028 Reviewed-By: Brian White <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
@JungMinuJungMinu merged commit fce4b98 into nodejs:masterAug 13, 2016
@JungMinu
Copy link
MemberAuthor

Landed in fce4b98

cjihrig pushed a commit that referenced this pull request Aug 15, 2016
`\n` is not enough for Linux with some custom stream add carriage returns to ensure that the output is displayed correctly using `\r\n` should not be a problem, even on non-Windows platforms. Fixes: #7954 PR-URL: #8028 Reviewed-By: Brian White <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
This was referenced Aug 15, 2016
@evanlucas
Copy link
Contributor

I feel like this should have been marked as a breaking change.

@yorkie
Copy link
Contributor

+1 on marking as breaking change.

@Fishrock123Fishrock123 added the semver-major PRs that contain breaking changes and should be released in the next major version. label Aug 17, 2016
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

replIssues and PRs related to the REPL subsystem.semver-majorPRs that contain breaking changes and should be released in the next major version.utilIssues and PRs related to the built-in util module.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Newlines missing carriage returns in REPL, util.inspect() output

7 participants

@JungMinu@addaleax@mscdex@Fishrock123@evanlucas@yorkie@nodejs-github-bot