Skip to content
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

tsc -w should clear screen before each run #13020

Closed
k0pernikus opened this issue Dec 19, 2016 · 6 comments
Closed

tsc -w should clear screen before each run #13020

k0pernikus opened this issue Dec 19, 2016 · 6 comments
Labels
Fixed A PR has been merged for this issue Help Wanted You can do this Suggestion An idea for TypeScript

Comments

@k0pernikus
Copy link

k0pernikus commented Dec 19, 2016

Run compiler in watch mode: tsc -w. Change some files, causing multiple compilations.

Expected behavior:

As a developer, I expect the output of tsc -w to be relevant and concise to the current runtime. It should show me the information only of the current run, stating that either the compilation was a success or fail with an error message.

Actual behavior:

The output of previous compilations is kept.

Benefit:

During development, seeing old output is redundant, noisy, and it also takes away if there are errors in the output as I am not alarmed to them right away. They could simply have been errors from the last run.

I have to manually enter new lines or check the timestamps. I have to parse the output what error messages relate to which run. I am discovering myself hitting enter multiple times to create distinguishable marks so that I better see the output of the next run. Sometimes I just cancel watch mode and run tsc multiple times manually while debugging an issue.

Another tool that has a similar feature to what I am proposing is mocha with their min reporter.

@RyanCavanaugh RyanCavanaugh added In Discussion Not yet reached consensus Suggestion An idea for TypeScript labels Dec 19, 2016
@RyanCavanaugh RyanCavanaugh added Help Wanted You can do this and removed In Discussion Not yet reached consensus labels Mar 7, 2017
@RyanCavanaugh RyanCavanaugh added this to the Community milestone Mar 7, 2017
@RyanCavanaugh
Copy link
Member

Accepting PRs - should be straightforward. Add a cls method to sys; we'll take care of implementing it for tsc.exe

@GongT
Copy link

GongT commented Jun 18, 2017

on linux, I m using this for a lone time:

function tscp {
        echo -en "\ec\0typescript compiling (source: $1)...\r"
        tsc -w -p "$1" | sed 's/^.*File change detected/\x1Bc\0/g'
}

cmd.exe also support "\x1Bc" ( c ), at least on win10.

@mhegazy
Copy link
Contributor

mhegazy commented Dec 2, 2017

Fixed by #20389

@mhegazy mhegazy closed this as completed Dec 2, 2017
@iffy
Copy link

iffy commented Feb 22, 2018

How can I disable this?

@eile
Copy link

eile commented Feb 26, 2018

This is very disruptive for my setup. Please add an option to disable.

@k0pernikus
Copy link
Author

@iffy @eile This issue was for clearing the screen during watch mode. If you want an option to disable that feature, you'll better open a new issue as this one has been closed.

(And xkcd prives right once again: https://imgs.xkcd.com/comics/workflow_2x.png ;) )

@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
Fixed A PR has been merged for this issue Help Wanted You can do this Suggestion An idea for TypeScript
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants