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

fix: swap toRemove & toAdd in deltaExtensions #227

Merged
merged 1 commit into from
Nov 7, 2023

Conversation

CompuIves
Copy link
Collaborator

@CompuIves CompuIves commented Nov 7, 2023

When we try to remove & add the same extension in a very short timeframe, it does not get initialized properly because it gets both added to toRemove and toAdd. When that happens, the extension is first added, and then immediately removed. By swapping toRemove and toAdd we ensure that the extension is first removed, and then newly added.

Here's similar code in VSCode where I think they encountered the same condition:

image

When we try to remove & add the same extension in a very short
timeframe, it does not get initialized properly because it gets both
added to `toRemove` and `toAdd`. When that happens, the extension is
first added, and then immediately removed. By swapping `toRemove` and
`toAdd` we ensure that the extension is first removed, and then newly
added.
@CGNonofr
Copy link
Contributor

CGNonofr commented Nov 7, 2023

Thank you!

@CGNonofr CGNonofr self-requested a review November 7, 2023 23:51
@CGNonofr CGNonofr merged commit 7afc32a into CodinGame:main Nov 7, 2023
1 check passed
@CGNonofr
Copy link
Contributor

CGNonofr commented Nov 7, 2023

Let's wait until all PRs are merged before releasing a new version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants