-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Multi-root Che Theia Workspaces #17212
Comments
@azatsarynnyy isn't it a duplicate of #15347? |
it isn't, as #15347 is about persisting in devfile, and this one is about automatic switch the layout |
ok I have just referenced this one as the second item of #15529 |
Some stuff will be broken if we move to multi-root: #17191 |
There is also already an open PR from @JPinkney introducing workspace-root per project here: eclipse-che/che-theia#408 |
Thanks, Thomas! We'll take a look at it as well. |
I've renamed the issue to "Multi-root Che Theia Workspaces |
There are couple questions about preferences for the multi-root mode, so I would like to discuss the topic here. It's expected for For a multi-root workspace it's expected that preferences are stored in workspace config file, like For the case, like this one a multi-root workspace knows nothing about the preference, as I could provided some logic for the multi-root mode and export preferences from
Also we should think about conflicts or just overwrite preferences at switching the multi-root mode - if preferences are not equal. Note: As I mentioned above - I don't see any problems and we don't need provide any logic to export preferences for the case like this - it's handled automatically for both modes: multi-root is To be honest I'm not sure that it's usual use case for @benoitf @azatsarynnyy @ericwill @tsmaeder |
tl:dr:
A couple of high-level thoughts here: First off: I don't think "single-root" mode should exist after a period of transition: they will all be multi-root workspaces, even if they only contain a single project. From a UI point of view, it should not make a difference to the user. Therefore, we should not concern ourselves with single-root when we think about long-term solutions. If we want to prevent losing user settings in existing workspaces, we should write some one-time migration code and keep it separate from the mainline code. But IMO, I don't think we should bother. "Single" vs. "multi-root" is a technical distinction of no value the the Che user. Second: merging the preference values will have the exact same problems we have with che-command and tasks: it will be impossible to tell how to merge conflicts automatically: whatever we do, the merge policy should be the same as with other artifacts we propagate from the devfile to Theia. Third: the issue @sunix brings up is because of our workaround for not getting a fix for #17975. Our team cannot properly fix that issue because we do not own the meta.yml format. Even though some might not like the terminology, I consider our current workaround a hack, because the mechanism for translating meta.yaml info into Theia settings should be in a single location, not recreated in each plugin meta.yml. Solving the problem in individual sidecar entrypoints creates unnecessary and implicit coupling in our code and leads to breakage (as we're seeing now) when we make changes. |
Thanks Roman for raising your concerns.
Che-Theia handles settings.json in any workspace folder, so everything works here the same as in VS Code. We don't care what folder the user has opened as a workspace folder.
It works as it should. Any preferences come from a Devfile go to Workspace level. If we need to change that behavior in future then we'll reconsider it.
It's some hack. We shouldn't handle it in the context of multi-root work.
Absolutely, no need to handle such cases. Switching the multi-/single-root mode is a temporary stage.
That's not expected use-case. |
Is your enhancement related to a problem? Please describe.
A lot of VS Code extensions require multi-root layout to work properly.
To set up a multi-root Che Theia Workspace, one needs to do several repetitive steps on each start of Che Workspace.
Describe the solution you'd like
Che Theia should automatically switch the layout of the users' projects to a multi-root Che Theia Workspace.
Since not all of VS Code extensions are supporting multi-root mode yet,
Che Theia should provide a command to quickly switch between multi/single root modes.
Switching to a multi-root mode should happen as earlier as possible, e.g.:
1/ clone the projects
2/ convert each project to a Workspace root
3/ LS initialization, import Commands as Tasks, etc.
As multi-root mode affects several areas (LS, Tasks, etc.),
it's not expected to get a completely working solution as a result of this issue.
It may be PoC of the described idea, at least. Then, we'll see if some areas require more adaptation.
Additional context
https://code.visualstudio.com/docs/editor/multi-root-workspaces
Sub-tasks
The text was updated successfully, but these errors were encountered: