-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Allow not clearing the console on recompiles in --pretty --watch mode #21295
Comments
I do not think we want to keep adding new flags. |
At least on linux with xterm the \x1Bc sequence used by this feature to clear the screen also rings the terminal bell, which gets quite maddening in short order. I can also see how the clearing behavior would be frustrating when used in a non-interactive manner. I would also appreciate a way for this to go away. |
Another use case: we've been using TypeScript with the new Babel parser, and because there's no type checking it's handy to run Similar scenario when using TS in combination with The new behaviour breaks this kind of workflow and pretty much necessitates wrapping/piping |
@clarkdave You are my hero!!! |
We have the same problem. We have a monorepo and lots of tooling that runs 5+ instances of tsc concurrently for various projects. The new behavior breaks all our tools and gsed doesn't come with OS X. Can we get this behavior behind a flag? |
Same problem here. We don't need tsc to have the screen cleared for us. We need consistent linear output as was before. Please make this configurable. |
@clarkdave the command doesn't work on macOS. MacOS comes with sed but it unfortunately doesn't support the |
@TimonVS Works fine for me. Just install |
@demisx Thanks, I was aware of that :). But that means that I have to force my whole team to install this on their computers. I'm lucky that all my co-workers use macOS (so everyone has the same setup), but I'd still argue that this should be solved by TypeScript itself. |
@TimonVS Oh, yeah. No doubt! The |
@TimonVS @demisx @clarkdave @roblav96 if it helps, I just published an NPM package https://www.npmjs.com/package/tsc-fancy Otherwise, I'm closing this issue since the TS team is against adding the flag in, and there are two workarounds ( |
Can we reopen this or revert the watch change? Having to use tsc-fancy to hack around tsc's defaults being hostile to scripts isn't good. |
A portable workaround for scripts is: To customize the actions to be taken when compilation succeeds or fails, such as clear or don't clear screen, say something, record metrics, you can use: |
@mhegazy Multiple devs creating hacky workarounds, which should be a simple compiler option. Don't you think it should just be added? |
We need an option to prevent clearing. Who's idea was it to clear old logs? |
I maintain the terminal in VS Code and I don't think it should clear either. This actually caused an issue in our tasks feature which I had to act on because it's not typical of a build tool and because of how the terminal works under Windows (forces redraws of the entire screen unlike Linux/macOS) microsoft/vscode#44192 There's a reason build tools don't normally touch the rest of the screen outside of rewriting the current line; preserving history, working better with tall terminals, helping users noticing when things change, etc. The change should be be reverted imo. |
|
Is there any hope of getting this fixed in 2.7.3? I see it was added to milestone 2.8 which has no due date and is only 35% done :( |
2.8 RC should be out in 2 weeks. and 2.8.1 should be out in 4 weeks. |
This implementation is a mistake. |
Repeating @ogvolkov's comment:
The text was updated successfully, but these errors were encountered: