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

Save Participants disables linting and takes forever to run. #88149

Closed
ShaneSchroll opened this issue Jan 6, 2020 · 10 comments
Closed

Save Participants disables linting and takes forever to run. #88149

ShaneSchroll opened this issue Jan 6, 2020 · 10 comments
Assignees
Labels
*caused-by-extension Issue identified to be caused by an extension

Comments

@ShaneSchroll
Copy link

This recently started showing up. Whenever I save a Twig file, a new process "Running Save Participants..." shows up at the bottom and takes 5+ seconds to run even on a Twig file with nothing in it. Then, after saving once, all linting, auto close tags, etc no longer work until I quit and reopen VSCode - which obviously makes this unusable.

The linting breaks for all files, not just twig as soon a save is performed.
All "hovers" are broken, just stops at "loading.." when hovering for code info.

'Format on Save' is off in settings.
'Code Actions on Save' is off in settings.
'TimeOut for save participants' is 0 (settings say to use 0 to disable...)
Setting PHP to lint onType makes the process take 20+ seconds to save a file.

All extensions disabled - does the same thing, breaks all linting and takes forever to save.

I'm not sure when this was introduced, but the problem started when I updated to the December version a couple days ago and i'm looking into a way to rollback as VSCode is completely unusable in this state.

A reinstall did not solve the issue.
OS: MacOS Mojave

Version: 1.41.1
Commit: 26076a4
Date: 2019-12-18T14:57:51.166Z
Electron: 6.1.5
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Darwin x64 18.7.0

@mjbvz
Copy link
Collaborator

mjbvz commented Jan 6, 2020

Are you sure this reproduces with all extensions disabled? VS Code should not do anything to twig files by default, but extensions certainly can

@mjbvz mjbvz added the info-needed Issue requires more information from poster label Jan 6, 2020
@ShaneSchroll
Copy link
Author

After more looking I had 1 hidden extension I missed. It is "Twig Language 2" by mblode. However, it has happened before with the other 2 Twig language packs in the extension library (one again by mblode, and the other by whatwedo). The issue seemingly disappeared again, though it has happened multiple times before. I'm not sure if there are certain circumstances when VSCode starts that it just doesn't load something properly. I can say that it has always been Twig files that present this issue (for me). Though usually a restart of VSCode resolves the issue. It's just odd that it crops up every now and again. This time it did not resolve after quitting and restarting multiple times, so I thought this time something might actually be broken.

To add further context, when the "Save participants" was running, it took about 5 mins for linting to start working again, which seems odd that this process requires that many resources that linting is "broken" for a few minutes (all languages). Is there maybe a conflict with the regular PHP server that is causing issues when using Twig - I don't think this is the case, but maybe there is a conflict. I do know that lintOnType being true in the settings made the save process take much longer.

@mjbvz
Copy link
Collaborator

mjbvz commented Jan 11, 2020

I'm closing this as caused by extension. Please follow with those extensions upstream

@mjbvz mjbvz closed this as completed Jan 11, 2020
@mjbvz mjbvz added *caused-by-extension Issue identified to be caused by an extension and removed info-needed Issue requires more information from poster labels Jan 11, 2020
@Manubi
Copy link

Manubi commented Feb 14, 2020

I have the same problem in a typescript file. How can I find out which extension is causing the problem?

@revelt
Copy link

revelt commented Feb 17, 2020

I've seen this issue raised many times already, it seems mixed-source code is causing this; linting or other processing plugin fails and "Save participants" drags on.

@mjbvz this bug needs to be tended on VSC side, you can't delegate to plugin maintainers forever; there are 29 closed issues with "Save participants", this bug does not happen on other code editors.

@mjbvz
Copy link
Collaborator

mjbvz commented Feb 18, 2020

@revelt So do you see this issue with all your installed extensions disabled?

@revelt
Copy link

revelt commented Feb 18, 2020

@mjbvz Thank you for following up. The bug is very sneaky, it seems it occurs only on mixed syntax code, specifically where language is not recognised. Shane (original poster) was using Twig, I was using Nunjucks in the morning, switching between Jinja and HTML syntaxes. That's when IDE freaked out with "Save Participants" bug. But then later, I went to work and been coding React/JSX happily all day today, no problems, "Save Participants" popup didn't appear, I was even switching between different React projects.

I'll try to recreate the bug. It's sneaky and I suspect syntax parsers break in mixed sources code.

@ShaneSchroll
Copy link
Author

ShaneSchroll commented Feb 18, 2020

@revelt @mjbvz This is the case for me as well: mixed syntax code causes the issue. But, as Roy pointed out, it appears randomly. I've worked all day with twig/html and even react/jsx with no issues. Then other days it starts on the first save in a mixed syntax file.

I do have 'files.associations' pointing html to twig and vice-versa, which allows me to set the language as HTML, and keep twig parsing/linting/colorization, even though it is recognized as just HTML. The issue is still present even though it is no longer labelled as a "HTML (Twig)" file.

**Edit:
The issue was also present before making the above change in my settings. I thought the setting might help by taking away Twig from the Language Mode, but it persists.

**Edit:
I am now on the January 2020 VSCode version.

@mjbvz
Copy link
Collaborator

mjbvz commented Feb 18, 2020

What you expect VS Code to do here? From everything described so far, the linter extensions you have installed cause this problem and you can't expect VS Code to work around their bugs

So please file an issue against these extensions. Then, if the extension maintainers feel there is some underlying VS Code issue, they can always follow up with us

@AlexReff
Copy link

I just started running into this issue, and in my case it appears as though it was due to having "source.fixAll": true" set in "editor.codeActionsOnSave" which was hanging in typescriptreact files (.tsx)

I don't think it's necessarily VSCode's responsibility to "fix the issue" if it's coming from extensions/linters, but having some way of identifying the underlying culprit would be helpful. I was unable to find any details about how to identify what is actually hanging or being slow. This is the most recent discussion on the topic. Would you be able to provide instructions here, or a link, on how a user can dig into this? If people are easily able to identify the culprit themselves, that would help cut down on people opening issues for VSCode.

@vscodebot vscodebot bot locked and limited conversation to collaborators Feb 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*caused-by-extension Issue identified to be caused by an extension
Projects
None yet
Development

No branches or pull requests

5 participants