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

Reconsider addWorkspaceFolder() implementation #19624

Closed
RomanNikitenko opened this issue Apr 19, 2021 · 2 comments
Closed

Reconsider addWorkspaceFolder() implementation #19624

RomanNikitenko opened this issue Apr 19, 2021 · 2 comments
Labels
area/plugins kind/enhancement A feature request - must adhere to the feature request template. kind/task Internal things, technical debt, and to-do tasks to be performed.

Comments

@RomanNikitenko
Copy link
Member

Is your task related to a problem? Please describe.

addWorkspaceFolder() method is responsible for the logic that add projects as workspace folders step by step, it respects the documentation for theia.workspace.updateWorkspaceFolders() API.
The method returns a promise and it's expected that the promise is resolved when a project is added as workspace folder.
But at the moment it's not true - there is no guarantee that a project is added as a workspace folder when a promise is resolved.
The promise can be resolved, for example, when a project just added to a queue.

Previously, it was not critical, the goal of the current implementation was - add projects as workspace folders with respect the documentation.

But now we are starting to rely on a returned promise within eclipse-che/che-theia#1079, so we should revisit addWorkspaceFolder() and improve it.

Describe the solution you'd like

I believe we should resolve a returned promise when we get an event from theia side that a project was added as workspace folder.
Please pay attention on the the documentation.

Describe alternatives you've considered

Additional context

AFAIK the problem has no influence for cloning process or adding projects to projects tree and so on.
At the moment it is actual for the recommendations plugin.

@RomanNikitenko RomanNikitenko added kind/task Internal things, technical debt, and to-do tasks to be performed. area/plugins labels Apr 19, 2021
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Apr 19, 2021
@ericwill ericwill added kind/enhancement A feature request - must adhere to the feature request template. and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Apr 19, 2021
@vitaliy-guliy
Copy link
Contributor

Linking with eclipse-che/che-theia#1076 as it contains reworked addWorkspaceFolder and added removeWorkspaceFolder, which are synchronized with each other.

@vitaliy-guliy
Copy link
Contributor

Solved by eclipse-che/che-theia#1076

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/plugins kind/enhancement A feature request - must adhere to the feature request template. kind/task Internal things, technical debt, and to-do tasks to be performed.
Projects
None yet
Development

No branches or pull requests

4 participants