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

Potential race condition when multiple files are moved? #32

Open
alex-broad opened this issue Mar 24, 2023 · 1 comment
Open

Potential race condition when multiple files are moved? #32

alex-broad opened this issue Mar 24, 2023 · 1 comment

Comments

@alex-broad
Copy link
Contributor

alex-broad commented Mar 24, 2023

Having now used the tool in anger I found I got some corrupted lines. I haven't fully been able to isolate it yet but it appears to happen when there are two files being moved that both cause changes to a single line in the same file. I wasn't able to recreate this scenario easily in the existing test framework as I don't think the test framework allows for this kind of interaction currently.

My gut is that it may be a race condition caused when VSCode makes calls to the plugin for each file being moved in quick succession, and as I suspect there is little/no protection over concurrent file access the corruption can occur?

@alex-broad
Copy link
Contributor Author

(overall the tool is great and has saved me a lot of time - it was only 3 occurrences in around 174 files which was easy enough to fix up manually!)

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

No branches or pull requests

1 participant