-
Notifications
You must be signed in to change notification settings - Fork 405
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 Hanging Progress Bar #536
Conversation
execution: CommandExecution, | ||
token: vscode.CancellationTokenSource | ||
) { | ||
await vscode.window.withProgress( | ||
return vscode.window.withProgress( |
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.
In my original pr (#527), I made the assumption that because withProgress
returns a promise, I had to await the resolution of the promise before continuing on with the execution of the remaining command code. However, this was a wrong assumption. WithProgress
sets up listeners that listen for the success/error exit codes of commands before resolving, and for a few commands, waiting on withProgress
to resolve actually prevented the command from even being executed at all. As a result, the listeners on withProgress
never received exit subjects, withProgress
never resolved, the command code was blocked from being executed, and the looping continued.
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 think this would prevent the hanging since you are no longer waiting for the progress indicator before continuing.
I have a question (and maybe @lcampos already answered this in the previous review) – what happens to the preference to show only in the status bar in https://github.com/forcedotcom/salesforcedx-vscode/pull/259/files?
@vazexqi I did not look into adding that preference to the progress notification. Right now, if you select that preference on one of the success popups, subsequent success messages will only be shown in the status bar, but the progress will still be shown in the progress notification popup. Should I add that preference to the progress notification to make the experience more consistent? |
Codecov Report
@@ Coverage Diff @@
## develop #536 +/- ##
===========================================
- Coverage 76.33% 76.05% -0.28%
===========================================
Files 147 147
Lines 5793 5793
Branches 904 904
===========================================
- Hits 4422 4406 -16
- Misses 1151 1161 +10
- Partials 220 226 +6
Continue to review full report at Codecov.
|
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.
It's OK. We don't need to add a new preference to it. We can show it for now. And rely on VS Code's hiding mechanism for the user to hide the progress bar.
But, do file a child bug for the Running Task view.
* Remove await from ProgressNotification.show * Remove async from ProgressNotification.show * Revert async execute method @W-5227494@
What does this PR do?
Fixes the hanging progress bar that prevents
SFDX: Refresh SObject Definitions
SFDX: Turn on Apex Debug Log for Replay Debugger
SFDX: Get Apex Debug Logs...
from executing.
What issues does this PR fix or reference?
W-5227494