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

Che commands binding for multi-root workspaces #17191

Closed
RomanNikitenko opened this issue Jun 18, 2020 · 5 comments
Closed

Che commands binding for multi-root workspaces #17191

RomanNikitenko opened this issue Jun 18, 2020 · 5 comments
Labels
area/plugins kind/enhancement A feature request - must adhere to the feature request template. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@RomanNikitenko
Copy link
Member

Current behavior

Configurations are exported from the devfile to the corresponding config file (tasks.json or launch.json) in the /workspaceFolder/.theia directory.

I think that actually che tasks at the moment are Global tasks.

For example, you have a devfile with two projects theia and che-theia and commands to build these projects (theia:build and che-theia:build tasks).
Both commands are available for running independently what workspace folder you open:

  • /projects is a workspace folder: theia:build and che-theia:build tasks are available for running
  • /theia is a workspace folder: theia:build and che-theia:build tasks are still available for running
  • che-theia is a workspace folder: theia:build and che-theia:build tasks are still available for running

Please see more details here

But why according to our strategy theia:build and che-theia:build tasks are global?
Maybe it make sense that one of them should belongs to theia project and another one to che-theia project. At the same time user can have global task build like:

        {
            "type": "che",
            "label": "build",
            "command": "yarn",
            "target": {
                "workingDir": "${workspaceFolder}",
                "component": "che-dev"
            }
        },

New behavior

According to the doc https://www.eclipse.org/che/docs/che-7/defining-custom-commands-for-che-theia/ there are the following types of commands:

  • exec
  • vscode-task
  • vscode-launch

Within current issue I would like to discuss how we should bind Che commands, especially taken into account that:

  • we are going to support multi-root workspaces
  • we are moving Che commands with type exec on user level (tasks configurations become truly Global)
  • AFAIK launch configurations are going to live in the config file of /workspaceFolder/.theia directory
@RomanNikitenko RomanNikitenko added kind/enhancement A feature request - must adhere to the feature request template. area/devfile area/plugins labels Jun 18, 2020
@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 Jun 18, 2020
@RomanNikitenko
Copy link
Member Author

btw: my first idea was described here #15540.

Now we have ability to define Che tasks as Global tasks on user level and we can reconsider our approach and our strategy.

@ericwill ericwill removed the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Jun 18, 2020
@tsmaeder
Copy link
Contributor

tsmaeder commented Jun 19, 2020

With eclipse-che/che-theia#739 being merged, we can map commands, which are global in the devfile (relative to projects) to user-level tasks in Theia.
However, the same is not true for launch configurations (see here: https://code.visualstudio.com/docs/editor/debugging#_launch-configurations) and general preferences.

Also, there is the action type theia-task which I interpret as adding theia tasks not of task type che to the Theia workspace. As long as they are one of the VS Code built-in types (shell/process), I don't expect any problems. But in VS Code, contributed tasks cannot be configured into the user-level tasks.json file, so extensions may make an assumption (the task is configured inside a workspace root), which would not hold if we replicated such tasks to the user-level tasks.json.

@tsmaeder
Copy link
Contributor

In order to proceed with the general goal of enabling multi-root mapping of che workspaces, we need to solve the mapping of che command actions of type "vscode-task" and "vscode-launch".

@che-bot
Copy link
Contributor

che-bot commented Jan 20, 2021

Issues go stale after 180 days of inactivity. lifecycle/stale issues rot after an additional 7 days of inactivity and eventually close.

Mark the issue as fresh with /remove-lifecycle stale in a new comment.

If this issue is safe to close now please do so.

Moderators: Add lifecycle/frozen label to avoid stale mode.

@che-bot che-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 20, 2021
@RomanNikitenko RomanNikitenko removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 20, 2021
@che-bot
Copy link
Contributor

che-bot commented Jul 19, 2021

Issues go stale after 180 days of inactivity. lifecycle/stale issues rot after an additional 7 days of inactivity and eventually close.

Mark the issue as fresh with /remove-lifecycle stale in a new comment.

If this issue is safe to close now please do so.

Moderators: Add lifecycle/frozen label to avoid stale mode.

@che-bot che-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 19, 2021
@che-bot che-bot closed this as completed Aug 9, 2021
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. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

No branches or pull requests

4 participants