You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Rapid progress.report({increment}) values are lost #54295
OS Version: elementaryOS Loki (Ubuntu 16.04 Xenial)
Steps to Reproduce:
An extension calls withProgress(...) to get a progress handle.
Call progress.report({increment: value}) quickly in a short time frame
The progress increments are lost.
Does this issue occur when all extensions are disabled?: Yes
As far as I can tell, the trouble is the debouncer for progress RPC. It "merges" repeated progress calls into a single progress RPM, but a faulty conditional prevents repeated increment values from being added together to sum up to the final value. See the linked commit.
Sure. Should I attach the ext as an archive? Upload a repo? I could also just attach a VSIX.
Here's the entirety of extension.ts, if that suffices:
'use strict';import*asvscodefrom'vscode';functionpause(time: number): Thenable<void>{returnnewPromise(resolve=>{setTimeout(()=>{resolve();},time);});}exportfunctionactivate(){vscode.commands.registerCommand('bad-progress.showProgress',()=>{returnvscode.window.withProgress({location: vscode.ProgressLocation.Notification,title: 'Dummy Progress'},async(pr)=>{letvalue=0;while(value<100){// Wait for a random amount of time. Pauses less than the debounce time (100ms)// will cause the progress notification to lose increments.// With 200ms as the max pause, 1/2 increments will be lost. The// resulting progress bar will show about 1/2 progress.awaitpause(Math.random()*200);value++;// Increment. Show the actual percentage for reference.pr.report({increment: 1,message: `Progress is at ${value}%`});}awaitpause(2000);},);});}exportfunctiondeactivate(){}
Activity
Progress API: Can block renderer (fixes #46642)
vscodebot commentedon Jul 14, 2018
(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:
bpasero commentedon Jul 14, 2018
Colby Pike (@vector-of-bool) can you provide a small sample on top of a generated extension (via "yo code" generator - link).
vector-of-bool commentedon Jul 14, 2018
Sure. Should I attach the ext as an archive? Upload a repo? I could also just attach a VSIX.
Here's the entirety of
extension.ts, if that suffices:bpasero commentedon Jul 14, 2018
Thanks, I can have a look.
Revert "fix #54295, fix #54369"
better fix for #54295 & #54369