-
Notifications
You must be signed in to change notification settings - Fork 29k
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
Multiple code actions conflict due to a race condition #90220
Comments
This seems like the same issue as #83586 When I investigated the issue, it seems that VS Code is doing the right thing. However it is possible there is a bug in the extensions. VS Code executes the actions in the correct order but extensions need to return a promise that tracks when they have completed editing the file. If an extension does not do this, we will try executing the next actions before the previous one completed Please try following up with the python extensions on this. If they come back and say that VS Code really is doing the wrong thing, we will take a look. |
@mattbierner You did see that the It has nothing to do with formatting. It has nothing to do with the issue you linked... in which I was also active. |
@mattbierner I also already did what you are asking me to do before opening the issue here. Did you look at the linked issues before posting your comment and closing this issue? I reported this issue on the vscode-python extension before opening this issue here, see: microsoft/vscode-python#9889 Could you please reopen this issue? |
@mattbierner I also want to make sure that it is clear that the extensions independently work without any issues. I checked the code of the pyright extension and it looks to me like they are returning the promise as you expect: https://github.com/microsoft/pyright/blob/master/client/src/progress.ts So I guess we are back here. Could you please reopen. |
@Spenhouet Yes. I'd really like an extension author to look at this and tell me what exactly VS Code is doing wrong here. There's are many cases where it's the extension themselves misbehaving so I'd really like to know what the issue is from the extension's point of view before diving into this |
I don't know since when this option is available but I did see that pyright now has the option to disable their import organizer. This does not solve the underlying issue!
|
Environment:
Does this issue occur when all extensions are disabled?: No
Issue:
This is what happens when only pressing save once (only input 1 x STRG+S):
This is due to multiple code actions running in parallel.
This is not an issue with the extensions them self (I tested them independently and they work fine), this is a VS code issue.
Steps to Reproduce:
Python
andPyright
extensions.ms-python.python
ms-pyright.pyright
Possible solution:
Code action providers should run successively.
Others:
I want to mention that code actions and formatting also conflicts with a race condition. This should also be addressed independently and is tracked here: #83586
The text was updated successfully, but these errors were encountered: