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

Composite progress will not work unless composite is instantiated #92445

Closed
bpasero opened this issue Mar 11, 2020 · 1 comment
Closed

Composite progress will not work unless composite is instantiated #92445

bpasero opened this issue Mar 11, 2020 · 1 comment
Labels
*out-of-scope Posted issue is not in scope of VS Code workbench-views Workbench view issues
Milestone

Comments

@bpasero
Copy link
Member

bpasero commented Mar 11, 2020

Not a regression from your work but more likely to happen now: the withCompositeProgress method may be called with a progress indicator that is undefined because the composite may not have been instantiated yet. This can happen if a view is opened in a viewlet that was previously not opened but someone reports progress for it.

I think the progress service for composites would need to listen for the composite to become alive to replay the progress.

Code to reproduce:

this.progressService.withProgress({
	location: <some view>
}, progress => {
	return new Promise(resolve => {
		setTimeout(() => {
			resolve();
		}, 20000);
	});
});

this.progressService.withProgress({
	location: <some other view>,
	total: 100
}, progress => {
	return new Promise(resolve => {
		setTimeout(() => {
			resolve();
		}, 20000);

		setInterval(() => {
			progress.report({ increment: 2 });
		}, 1000);
	});
});
@bpasero bpasero added the bug Issue identified by VS Code Team member as probable bug label Mar 11, 2020
@bpasero bpasero changed the title Composite progress will not work in this case Composite progress will not work unless composite is instantiated Mar 11, 2020
@bpasero bpasero added the workbench-views Workbench view issues label Mar 11, 2020
@lramos15 lramos15 assigned bpasero and unassigned eamodio Oct 8, 2021
@bpasero bpasero added this to the October 2021 milestone Oct 9, 2021
@bpasero bpasero added the *out-of-scope Posted issue is not in scope of VS Code label Oct 11, 2021
@bpasero bpasero removed their assignment Oct 11, 2021
@bpasero bpasero removed the bug Issue identified by VS Code Team member as probable bug label Oct 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
*out-of-scope Posted issue is not in scope of VS Code workbench-views Workbench view issues
Projects
None yet
Development

No branches or pull requests

3 participants
@eamodio @bpasero and others