-
-
Notifications
You must be signed in to change notification settings - Fork 395
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 auto upload #807
Fix auto upload #807
Conversation
Thanks for the PR. But if you look into this link. It says
I think we still can use vscode watcher itself, if they provide watch on absolute paths. If yes, then we only need to fix the paths. |
It was removed on 7716e71#diff-72050d84a8ab08bacc0bd4ac1c1bfb8f by @nekonenene
In 'Workspaces' only or we can set by absolute paths ? |
On that same page, it says this:
I'm guessing this means that you can use relative paths to watch a subfolder of a workspace folder, like src or src/utilities, but the rules still apply. |
alright, thanks |
This PR has a bug which has been fixed in #814. Please try that one as it not only fixes this bug, but it also adds some great new features. |
Can you re-open this and fix this independent so I can publish the new version containing this only this fix alongwith other PR ? |
Sure. However, It might take a while since I am going to be away from home for a few days. I'll try to fix it as soon as possible. |
I should be able to do it today, but I'm not 100% sure. |
No problem, we can wait. Give me a signal to test and publish when you are ready. |
These changes should fix it. Please look out for formatting issues in the code as I used my old laptop, and it seems like it messed up the formatting a bit. Other than that, it should work. If it doesn't, just let me know and I can try to fix it when I get back home. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have reviewed the code.
One thing is must that we need to use async/ await where possible.
Since the autoUploadService is an instance in Commons, using a global Commons instance will allow everything to use the same instance.
Ok, I have reverted to using asynchronous functions, and the code is ready to be further tested. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I have added more reviews.
One problem that users were having problem regarding the lock
was not working as expected.
You can test the lock
by running the following scenarios:
- Run auto upload, while its processing. Change one observed file and see, does the autoUpload runs again by destroying the old processing state or waits for it to be complete and ignore the again upload call.
- Open 2 code windows. edit any file and run autoupload from one code window by changing any observed file, while auto upload is running - Change the file once again from the second code window and observe - Acceptance will be it should ignore the auto upload process from the second code window and inform user that its already in process.
Can you please let me know after running the above two test cases.
Other than that, can we add some test cases for autoUpload as well ?
These are the final reviews, once done alongwith tests performed. It will be ready to merge and release with new version :)
Here are the results from my testing
I couldn't get two windows open with the development host, but the code still depends on the lock file, so it shouldn't matter how many windows there are open. |
You can make package from |
Ok, I'll try that as soon as I can and update the results when I'm done. |
Ok, I have tested it and can confirm that the lock file works. After starting auto upload on one window, attempting to start it on another window stopped the operation because the lock file was locked. |
Thank you for work. |
Thanks for merging! And yes, I will be available, just tag me and I'll get to work as soon as possible. |
New version is published. :) |
Short description of what this resolves:
This PR fixes auto-upload by using Chokidar and
vscode.extensions.onDidChange
instead ofvscode.FileSystemWatcher
, which only works on files in the current workspace.Changes proposed in this pull request:
vscode.FileSystemWatcher
to detect changes in user settingsStartWatch()
function after locking to prevent it from becoming unusableFixes: 3
How Has This Been Tested?
I have tested it by installing/uninstalling extensions and modifying my settings. I can confirm that the changes don't affect any other areas in the code, and it uploads and downloads successfully.
Checklist: