Skip to content

Added --preserveWatchOutput flag #21303

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

Merged

Conversation

JoshuaKGoldberg
Copy link
Contributor

Description: "Whether to keep outdated console output in watch mode instead of clearing the screen."
Since the pretty? compiler options flag is marked as @internal, made this one too.

Fixes #21295. Sending a PR before the issue is approved to increase probability of this shipping the same time as the clearing feature.

@gcnew
Copy link
Contributor

gcnew commented Jan 19, 2018

Maybe it would be better if the screen clearing was behind a flag. This way the new option would be a pure addition with the current behaviour unaltered.

@JoshuaKGoldberg
Copy link
Contributor Author

@gcnew Ehh, I really like the new behavior. It's quite useful on large projects. The lack of complaints from insiders makes me (without any experience tracking these things) suspect it wouldn't be too bad.

@imhoffd
Copy link

imhoffd commented Jan 31, 2018

I like the new behavior by default as well, but tsc -w becomes totally unusable when multiple compilers are run concurrently (think monorepos).

@mhegazy You mentioned that you don't want to add new flags (#21295 (comment)). Perhaps if could be generalized to a single flag which disables all tty view manipulation now and in the future. Even more generalized to disable any sort of interactivity. For yarn, this is --non-interactive. For TS, possibly --noInteractive?

If the ability to disable this feature isn't added, I (and others) will need to write a thin wrapper to tsc which tosses out the control character now being spit into our terminals.

@roblav96
Copy link

roblav96 commented Feb 9, 2018

#21295 (comment) by @clarkdave posted a working fix

@TimonVS
Copy link

TimonVS commented Feb 13, 2018

@JoshuaKGoldberg Why did you close the PR? The fix mentioned by @roblav96 doesn't work for Mac users (I don't want to force everyone in my team to install gsed).

@JoshuaKGoldberg
Copy link
Contributor Author

I closed the PR because a core TS member (mhegazy) mentioned last month that they don't want to add a compiler option for this, and since then it's obtained a few merge conflicts. You're welcome to send a new one & try to push for it though!

@JoshuaKGoldberg JoshuaKGoldberg deleted the preserve-watch-output-flag branch February 16, 2018 23:18
@JoshuaKGoldberg JoshuaKGoldberg restored the preserve-watch-output-flag branch February 28, 2018 22:55
@JoshuaKGoldberg
Copy link
Contributor Author

On second thought, @mhegazy, what are your thoughts on switching this flag to be opt-in? It sounds like this change broke a lot of people (sorry folks!).

I'll resolve the merge conflicts today regardless.

Description: "Whether to keep outdated console output in watch mode instead of clearing the screen."
Since the `pretty?` compiler options flag is marked as `@internal`, made this one too.
@JoshuaKGoldberg
Copy link
Contributor Author

I've sent a second PR, #22248, that has the equivalent change to make the behavior opt-in with a new --clearWatchOutput` flag. IMO that's a better fix.

@JoshuaKGoldberg
Copy link
Contributor Author

15:55:53   59310 passing (2m)
15:55:53   1 failing
15:55:53 
15:55:53   1) conformance tests
15:55:53        conformance tests for tests/cases/conformance/types/uniqueSymbol/uniqueSymbolsErrors.ts
15:55:53          Correct errors for tests/cases/conformance/types/uniqueSymbol/uniqueSymbolsErrors.ts:
15:55:53      Error: The baseline file uniqueSymbolsErrors.errors.txt has changed.

Does not show up locally and does not relate to this change. Unrelated?

@mhegazy
Copy link
Contributor

mhegazy commented Mar 1, 2018

thanks!

@mhegazy mhegazy merged commit 24d3035 into microsoft:master Mar 1, 2018
@JoshuaKGoldberg JoshuaKGoldberg deleted the preserve-watch-output-flag branch March 1, 2018 19:55
@microsoft microsoft locked and limited conversation to collaborators Jul 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants