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

Load built-in vscode plugins to Theia: grunt, gulp, jake #4814

Closed
lmcbout opened this issue Apr 4, 2019 · 4 comments · Fixed by #4926
Closed

Load built-in vscode plugins to Theia: grunt, gulp, jake #4814

lmcbout opened this issue Apr 4, 2019 · 4 comments · Fixed by #4926
Labels
tasks issues related to the task system vscode issues related to VSCode compatibility

Comments

@lmcbout
Copy link
Contributor

lmcbout commented Apr 4, 2019

Description

Capability to load built-in vscode plugins to Theia
Looking at grunt, gulp and jake

Reproduction Steps

Put the jake, grunt and gulp vscode built-in plugins into the theia/plugins folder
unzip/untar the test project attached
npm install // to build the node_modules
Start theia and load the test project into the browser
Note:
1- Load the test program (Note, just to test that we can extract the task as "GULP, GRUNT, JAKE, NPM"
2- For Jake, still under investigation

OS and Theia version:
Ubuntu 16.04
Theia 0.5.0

Diagnostics:

test.tar.gz

lmcbout added a commit that referenced this issue Apr 4, 2019
It is possible to have tasks with the same type, so we need to differentiate them.
Using the handle available with the task to create a unique provider.
Allow to have following plugins within the same workspace:
- grunt
- gulp
- jake

Signed-off-by: Jacques Bouthillier <jacques.bouthillier@ericsson.com>
@akosyakov akosyakov added tasks issues related to the task system vscode issues related to VSCode compatibility labels Apr 5, 2019
lmcbout added a commit that referenced this issue Apr 16, 2019
It is possible to have tasks with the same type, so we need to
differentiate them.
Using the handle available with the task to create a unique provider.
This allow to have following plugins within the same workspace:
- grunt
- gulp
- jake

Signed-off-by: Jacques Bouthillier <jacques.bouthillier@ericsson.com>
@lmcbout
Copy link
Contributor Author

lmcbout commented Apr 16, 2019

Jake is using the old API to computeTask(). Because of that, I need to implement the deprecated Task constructor to handle Jake.
To support the vscode built-in plugin for JAKE , there is two ways:
1- I need to implement the deprecated Task constructor to handle Jake.
2- Jake vscode built-in plugin needs to be adjusted to handle the creation of task using the newest API

In the current solution, I implemented solution 1, so we can support JAKE until vscode modify the Jake plugin

For solution 2, we need to modify:
File: jake/src/main.ts
Method computeTasks() at ~line 145, need to modify the following line by adding the workspaceFolder as a parameter:

OLD:
let task = new vscode.Task(kind, taskName, 'jake', new vscode.ShellExecution(${jakeCommand} ${taskName}, options));

NEW:
let task = new vscode.Task(kind, this._workspaceFolder, taskName, 'jake', new vscode.ShellExecution(${jakeCommand} ${taskName}, options));

For testing purpose, you need to add in the package.json the following packages. (Either in devDependencies or dependencies)
"dependencies": {
"gulp": "latest",
"gulp-util": "latest",
"gulp-sass": "latest",
"gulp-coffee": "latest",
"gulp-uglify": "latest",
"gulp-concat": "latest",
"gulp-connect": "latest",
"grunt": "~0.4.5",
"grunt-cli": "^1.3.2",
"grunt-contrib-jshint": "~0.6.4",
"grunt-contrib-nodeunit": "~0.2.0",
"grunt-contrib-watch": "~0.5.3",
"jake": "^8.1.1"
}
With those packages installed, you can test "Gulp", Grunt", "Jake" and "npm" if installed

@akosyakov
Copy link
Member

If this API is still into https://github.com/Microsoft/vscode/blob/master/src/vs/vscode.d.ts then we have to support it regardless whether it is deprecated or not. Just mark them as deprecated as well.

@benoitf
Copy link
Contributor

benoitf commented Apr 16, 2019

it is still there so yes (BTW PR is doing that)

@lmcbout
Copy link
Contributor Author

lmcbout commented Apr 16, 2019

This is what I did, I put deprecated with the constructor (Same as in vscode)

lmcbout added a commit that referenced this issue Apr 16, 2019
It is possible to have tasks with the same type, so we need to
differentiate them.
Using the handle available with the task to create a unique provider.
This allow to have following plugins within the same workspace:
- grunt
- gulp
- jake

Signed-off-by: Jacques Bouthillier <jacques.bouthillier@ericsson.com>
lmcbout added a commit that referenced this issue Apr 17, 2019
It is possible to have tasks with the same type, so we need to
differentiate them.
Using the handle available with the task to create a unique provider.
This allow to have following plugins within the same workspace:
- grunt
- gulp
- jake

Signed-off-by: Jacques Bouthillier <jacques.bouthillier@ericsson.com>
lmcbout added a commit that referenced this issue Apr 17, 2019
It is possible to have tasks with the same type, so we need to
differentiate them.
Using the handle available with the task to create a unique provider.
This allow to have following plugins within the same workspace:
- grunt
- gulp
- jake

Signed-off-by: Jacques Bouthillier <jacques.bouthillier@ericsson.com>
DoroNahari pushed a commit to DoroNahari/theia that referenced this issue Apr 29, 2019
It is possible to have tasks with the same type, so we need to
differentiate them.
Using the handle available with the task to create a unique provider.
This allow to have following plugins within the same workspace:
- grunt
- gulp
- jake

Signed-off-by: Jacques Bouthillier <jacques.bouthillier@ericsson.com>

Signed-off-by: Doron Nahari doron.nahari@sap.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tasks issues related to the task system vscode issues related to VSCode compatibility
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants