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

task created from task definition contributed from VS Code extension throws exception #12721

Closed
jcortell68 opened this issue Jul 18, 2023 · 0 comments · Fixed by #12770
Closed
Assignees
Labels
tasks issues related to the task system vscode issues related to VSCode compatibility

Comments

@jcortell68
Copy link
Contributor

jcortell68 commented Jul 18, 2023

Bug Description:

I've been playing around with creating a custom task definition in a VS Code extension I got a very primitive example working in VS Code. When I tried the same VS Code extension in Theia, I get an exception when I invoke the task.

2023-07-18T13:22:16.497Z root ERROR Request run failed with error: Process task config must have 'command' property specified Error: Process task config must have 'command' property specified
    at ProcessTaskRunner.run (C:\j.cortell\git\theiasandbox\node_modules\@theia\task\lib\node\process\process-task-runner.js:51:19)
    at TaskServerImpl.run (C:\j.cortell\git\theiasandbox\node_modules\@theia\task\lib\node\task-server.js:75:35)
    at RpcProxyFactory.onRequest (C:\j.cortell\git\theiasandbox\node_modules\@theia\core\lib\common\messaging\proxy-factory.js:134:49)
    at RpcProtocol.requestHandler (C:\j.cortell\git\theiasandbox\node_modules\@theia\core\lib\common\messaging\proxy-factory.js:115:80)
    at RpcProtocol.handleRequest (C:\j.cortell\git\theiasandbox\node_modules\@theia\core\lib\common\message-rpc\rpc-protocol.js:171:39)
    at RpcProtocol.handleMessage (C:\j.cortell\git\theiasandbox\node_modules\@theia\core\lib\common\message-rpc\rpc-protocol.js:68:26)
    at C:\j.cortell\git\theiasandbox\node_modules\@theia\core\lib\common\message-rpc\rpc-protocol.js:51:66
    at C:\j.cortell\git\theiasandbox\node_modules\@theia\core\lib\common\event.js:103:69
    at CallbackList.invoke (C:\j.cortell\git\theiasandbox\node_modules\@theia\core\lib\common\event.js:109:26)
    at Emitter.fire (C:\j.cortell\git\theiasandbox\node_modules\@theia\core\lib\common\event.js:224:29)
2023-07-18T13:22:16.503Z task ERROR Error launching task 'mytasktype: my source': Process task config must have 'command' property specified

I thought this issue might be specific to using a vscode.CustomExection in the contributed implementation of the task, but it happens equally if I use vscode.ShellExecution

Steps to Reproduce:

git clone -b task_definitions_bug1 https://github.com/jcortell68/theiasandbox
cd theiasandbox
yarn
yarn start:electron

Additional Information

  • Operating System: Windows
  • Theia Version: 1.39
@jcortell68 jcortell68 changed the title task based on vscode.CustomExecution() throws exeception when invoked task created from task definition contributed from VS Code extension throws exeception when invoked Jul 18, 2023
@jcortell68 jcortell68 changed the title task created from task definition contributed from VS Code extension throws exeception when invoked task created from task definition contributed from VS Code extension throws exception Jul 20, 2023
@martin-fleck-at martin-fleck-at self-assigned this Jul 25, 2023
@vince-fugnitto vince-fugnitto added tasks issues related to the task system vscode issues related to VSCode compatibility labels Jul 25, 2023
martin-fleck-at added a commit that referenced this issue Jul 27, 2023
- Make TaskProviderAdapter more resilient against undefined
- Ensure task type is not lost during conversion (used for custom exec)
- Ensure task type is considered during comparison

Fixes #12721
martin-fleck-at added a commit that referenced this issue Jul 27, 2023
martin-fleck-at added a commit that referenced this issue Jul 27, 2023
martin-fleck-at added a commit that referenced this issue Jul 27, 2023
martin-fleck-at added a commit that referenced this issue Aug 10, 2023
- Make TaskProviderAdapter more resilient against undefined
- Ensure task type is not lost during conversion (used for custom exec)
- Ensure task type is considered during comparison

Fixes #12721
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