-
Notifications
You must be signed in to change notification settings - Fork 377
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: unexpected file changes when editing #2786
Conversation
Nowadays, client handle most changes in local, so after first load, we also do not need server index anymore. |
…mposer into open-project-fix
Note for a special case.If some changes are made in current opened bot , not via Composer, e.g delete a dialog from local file system, the Composer wouldn't receive this changes. Cause this PR let Composer server use indexed project. To make Composer sync with external file change, user need to re-open current project force trigger a server index. |
* use cached projects * don't need to call init after project loaded * use a real-time refreshed files list, fix concurrency deletes * update test * create/saveAs/open project should call init * clean up * update Co-authored-by: Chris Whitten <christopher.whitten@microsoft.com> Co-authored-by: Ben Yackley <61990921+beyackle@users.noreply.github.com> Co-authored-by: Andy Brown <asbrown002@gmail.com>
Description
Issue #2748 is when editing, the concurrency bug in
reformat
methodsAfter some refactor by plugins PR #2023, getProjectById is called at very high frequency. And every getProjectById() --> Project.index() , and inside it some
reformat
methods executed would travels all files do reformat. When called in concurrency it produced a write bug.By re-using an indexed project instead of call index() everytime we could avoid this type problem and improve performance.
Issue #2793 is when delete a dialog, the concurrency bug in
removeFile
methods.this.files
is not updated immediately.Task Item
close #2748
close #2793
Screenshots