-
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
Support Che tasks for multi-root workspaces #15540
Comments
Should this issue be part of #15529 ? |
Generally, is it ok to manipulate "tasks.json" directly? Isn't there API that might take care of multi-root issues? |
@tsmaeder I created the issue to provide the mechanism how we can match a task from a |
VS Code also allows to store tasks globally, into the workspace definition file. |
@tsmaeder actually, I don't think it does :-( |
Since we're trying to remove obstacles to "multi-root" workspaces, we're taking this on in this sprint.
Currently, all che tasks are global tasks. If we get support for project-specific tasks in the devfile, we will need to sync to the .theia/tasks.json file. |
To me we should avoid to confuse the user. So rather than going further in multi-root workspaces support for task ... |
@sunix so what would are you suggesting concretely? |
|
I think the solution I sketched would fulfill point 1 and 2, no? |
In your solution you are still using tasks.json, no ? |
No, I would just call the Resource tasks.json. It would be backed by the devfile directly, not a disk file. |
I like the idea of hiding the devfile tasks in the workspace BUT I really think it should at least be possible to extend these tasks via a yml file in the project repo. |
@davidwindell would you agree that when you put a tasks file inside a project, it would make no sense to replicate those tasks to the devfile? |
Yes, I agree as otherwise it would be a maintenance nightmare. The benefit of in-repo tasks is that we don't have to give our developers access to edit the devfile registry (where all of our ~50 projects are) just to add tasks that are re-useable. |
In most of the case, Che tasks cannot be decoupled from:
In my opinion, storing just tasks (not devfile) in a project git repo is not a generic maintainable option. But you can have the devfile registry with a git repo(s) backend where your developers could have write access with moderations (PR) just like a normal git project. Another option (maybe the best one) could be to add the ability to register projects that have devfile.yaml file in it. edit: created an issue for that: #16377 |
Once eclipse-theia/theia#7620 is merged, we'll have to update che-theia because the type of TaskConfiguration._scope has changed and is no longer assignement-compatible with the type we're using in the che tasks API transport level. Just making it into |
Is your enhancement related to a problem? Please describe.
At the moment by default user gets
/projects
as workspace folder.As you can see there are
theia
andche-theia
projects and all defined indevfile
che
tasks are stored to/projects/.theia/tasks.json
file.Describe the solution you'd like
We can consider the same example for case when user has multi-root workspace. For this case there are two workspace folders:
theia
andche-theia
.According to https://code.visualstudio.com/docs/editor/multi-root-workspaces#_tasks each workspace folder can contain
tasks.json
file with the corresponding configurations.So user can have a set of task configurations for
theia
project and a set of task configurations forche-theia
project:theia
scope configurations are available for running iftheia
workspace folder is openche-theia
scope configurations are available for running ifche-theia
workspace folder is opentheia
andche-theia
scope configurations are available for running in multi-root caseI think we should provide opportunity to define in a
devfile
source
field for ache
command to store this one as task in the correspondingtasks.json
file.The text was updated successfully, but these errors were encountered: