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

Support legacy problem matchers #6567

Closed
tolusha opened this issue Nov 18, 2019 · 4 comments · Fixed by #6616
Closed

Support legacy problem matchers #6567

tolusha opened this issue Nov 18, 2019 · 4 comments · Fixed by #6616
Assignees
Labels
tasks issues related to the task system vscode issues related to VSCode compatibility

Comments

@tolusha
Copy link
Contributor

tolusha commented Nov 18, 2019

Description

There is a task which comes from quarkus extension [1] and it is invalid due to the error regarding problemMatcher:

Incorrect type. Expected "string".
Value is not accepted. Valid values: "$clangTidyMatcher", "$eslint-compact", "$eslint-stylish", "$go", "$gulp-tsc", "$jshint", "$jshint-stylish", "$lessCompile", "$msCompile".(1)
     {
         "label": "quarkus:dev",
         "type": "shell",
         "command": "./mvnw quarkus:dev ",
         "windows": {
            "command": ".\\mvnw.cmd quarkus:dev "
         },
         "isBackground": true,
         "problemMatcher": [
            {
               "pattern": [
                  {
                     "regexp": "\\b\\B",
                     "file": 1,
                     "location": 2,
                     "message": 3
                  }
               ],
               "background": {
                  "activeOnStart": true,
                  "beginsPattern": "^.*Scanning for projects...*",
                  "endsPattern": "^.*Quarkus .* started in .*\\. Listening on:*"
               }
            }
         ]
      }

It seems Theia problemMatcher scheme is different from VS Code one [3]

[1] https://github.com/redhat-developer/vscode-quarkus
[2] https://github.com/eclipse-theia/theia/blame/master/packages/task/src/browser/task-schema-updater.ts#L215
[3] https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/contrib/tasks/common/jsonSchemaCommon.ts#L37

@tolusha tolusha added tasks issues related to the task system vscode issues related to VSCode compatibility labels Nov 18, 2019
@tsmaeder
Copy link
Contributor

@tolusha what's the difference?

@tolusha
Copy link
Contributor Author

tolusha commented Nov 18, 2019

type: 'array',
					items: {
						anyOf: [
							{
								type: 'string',
							},
							Schemas.LegacyProblemMatcher
						]
					}

vs

type: 'array',
            description: 'Name(s) of the problem matcher(s) to parse the output of the task',
            items: {
                type: 'string',
                enum: problemMatcherNames
            }

@elaihau
Copy link
Contributor

elaihau commented Nov 21, 2019

the current schema is

const problemMatcher = {
    oneOf: [
        {
            type: 'string',
            description: 'Name of the problem matcher to parse the output of the task',
            enum: problemMatcherNames
        },
        {
            type: 'object',
            description: 'User defined problem matcher(s) to parse the output of the task',
        },
        {
            type: 'array',
            description: 'Name(s) of the problem matcher(s) to parse the output of the task',
            items: {
                type: 'string',
                enum: problemMatcherNames
            }
        }
    ]
};

and therefore "an array of objects" is not supported.

I can added the support.

@elaihau elaihau self-assigned this Nov 21, 2019
@tolusha
Copy link
Contributor Author

tolusha commented Nov 21, 2019

@elaihau
It will be nice!

elaihau pushed a commit that referenced this issue Nov 25, 2019
- resolved #6567: With this change Theia support users defining a
collection of problem matchers in tasks.json
- added json schemas to validate the user-defined problem matchers in
tasks.json
- fixed the bug with task's schema to allow configured tasks and
customized detected tasks in the same tasks.json

Signed-off-by: Liang Huang <[email protected]>
elaihau pushed a commit that referenced this issue Nov 26, 2019
- resolved #6567: With this change Theia support users defining a
collection of problem matchers in tasks.json
- added json schemas to validate the user-defined problem matchers in
tasks.json
- fixed the bug with task's schema to allow configured tasks and
customized detected tasks in the same tasks.json

Signed-off-by: Liang Huang <[email protected]>
akosyakov pushed a commit to akosyakov/theia that referenced this issue Feb 24, 2020
- resolved eclipse-theia#6567: With this change Theia support users defining a
collection of problem matchers in tasks.json
- added json schemas to validate the user-defined problem matchers in
tasks.json
- fixed the bug with task's schema to allow configured tasks and
customized detected tasks in the same tasks.json

Signed-off-by: Liang Huang <[email protected]>
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