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

Output window pops up repeatedly and I can't stop it. #583

Closed
nnmrts opened this issue Nov 28, 2021 · 5 comments
Closed

Output window pops up repeatedly and I can't stop it. #583

nnmrts opened this issue Nov 28, 2021 · 5 comments
Labels
bug Something isn't working dx needs investigation

Comments

@nnmrts
Copy link

nnmrts commented Nov 28, 2021

Describe the bug

Whenever I'm writing code, especially JSX, I obviously have syntax errors for short periods of time, because, well, no one can write 200 characters in one millisecond. It's wonderful that lsp works so fast, and if I need it, I can open the output window and it's there. The problem begins when it repeatedly pops up while I'm writing code that's not "finished" yet. An example:

const Nav = class extends Component {
	render() {
		return (
			<nav>
				<ul>
					{
						routes.map(({ paths: [path], name }) => {
							return (
									<Link href={path} key={path}>
										{name}
									</Link>
							)
						})
					}
				</ul>
			</nav>
		)
	}
};

export default Nav;

Let's suppose I want to enclose the Link component there with a <li>...</li> element. I would move my cursor to the return ( above the start of the Link component, then add a linebreak and start typing. I start with <li and as soon as I type > to close the tag, vscode will automatically add a closing </li> tag after it. That's expected and fine, just not exactly what I want in this specific case. So what I do then is to remove the closing tag to later input it after the closing </Link> tag. But as soon as I remove the closing </li> tag, the Deno Language Server output window will just pop up over my code. If I then close it to fix my code, it pops up again just by moving my cursor. I literally just clicked somewhere else in my code and the same window with the same error pops up again. Alright, so now I have to somehow scroll down in my code while the output window is open and aggresively spits out errors on every keystroke. Here is a short video of my experience:

Bildschirmaufnahme.2021-11-28.um.16.15.47.mov

To Reproduce

Described above in detail, but JSX is not the only way to get this behaviour.

Expected behavior

It shouldn't pop up repeatedly like this, or there should at least be an option to disable it. Something like described here. I also tried out pretty much every answer from https://stackoverflow.com/questions/38704879/disable-vs-code-output-window-not-visual-studio/44155463, doesn't do anything unfortunately.

Versions

vscode: 1.63.0-insider deno: 1.16.3 extension: 3.9.2

@kitsonk kitsonk added bug Something isn't working needs investigation labels Dec 2, 2021
@kitsonk
Copy link
Contributor

kitsonk commented Dec 2, 2021

There are several issues with tsc and JSX/TSX when typing that cause diagnostic errors, which we send a message and it keeps popping up.

We need to determine if they are known tsc issues or issues with our integration to the tsc language server and see if we can more intelligently "swallow" them.

@nnmrts
Copy link
Author

nnmrts commented Dec 2, 2021

I agree. Btw, I just found the commit in the live sass compiler extension which implemented a way to suppress the output window:
ritwickdey/vscode-live-sass-compiler@19ef2bc

I realize that it's more than 3 years old and vscode's API probably changed since then, but yeah, maybe it helps.

@kitsonk
Copy link
Contributor

kitsonk commented Dec 2, 2021

We don't have to resort to that, when we get failures from tsc, we unconditionally return them to the client as an internal error. We can instead simply log them out and return an "empty" response instead of an error response.

@bartlomieju bartlomieju added the dx label Jul 11, 2023
@nnmrts
Copy link
Author

nnmrts commented Aug 29, 2023

I think this can be closed, at least I no longer experience any of the described behaviour these days. Since I personally hate going into old issues on GitHub and finding them closed because the issue creator "fixed" it for themself, I'll leave the decision up to the maintainers.

@bartlomieju
Copy link
Member

Thanks for the update, I'm gonna close the issue now then :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dx needs investigation
Projects
None yet
Development

No branches or pull requests

3 participants