Added console clearing with a message to --watch starts#20427
Merged
sheetalkamat merged 3 commits intoDec 5, 2017
Conversation
I advocated against immediately clearing the console when starting --watch in microsoft#17756 because it was confusing to have the console suddenly become blank, wait a while, and _then_ give output. After using the feature for a little while, I think it's a little disorienting how the console will only start clearing after the first recompile. This change clears the console and immediately prints a new "Starting compilation in watch mode..." message.
|
Build fixed by #20429, please rebase once that's in. |
Contributor
|
@sheetalkamat can you please review this change, and merge |
Contributor
|
@JoshuaKGoldberg some new CI failures after #20429. can you take a look. |
sheetalkamat
reviewed
Dec 4, 2017
| // There is no extra check needed since we can just rely on the program to decide emit | ||
| const builder = createBuilder({ getCanonicalFileName, computeHash }); | ||
|
|
||
| if (watchingHost.system.clearScreen) { |
Member
There was a problem hiding this comment.
Can you create function expression clearScreen when entering this function and use that instead of if checks here and in update program?
const clearScreen = watchingHost.system.clearScreen ? watchingHost.system.clearScreen.bind(watchingHost.system) : noop;
added 2 commits
December 4, 2017 23:11
# Conflicts: # src/harness/unittests/tscWatchMode.ts
sheetalkamat
approved these changes
Dec 5, 2017
|
Is it possible to still have the old behavior behind the flag? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Followup to #20379.
I advocated against immediately clearing the console when starting --watch in #17756 because it was confusing to have the console suddenly become blank, wait a while, and then give output. After using the feature for a little while, I think it's a little disorienting how the console will only start clearing after the first recompile. This change clears the console and immediately prints a new "Starting compilation in watch mode..." message.