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

Inconsistencies task.json vs. task.json schema #243556

Open
fipro78 opened this issue Mar 14, 2025 · 2 comments
Open

Inconsistencies task.json vs. task.json schema #243556

fipro78 opened this issue Mar 14, 2025 · 2 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities tasks Task system issues

Comments

@fipro78
Copy link

fipro78 commented Mar 14, 2025

Type: Bug

When trying to validate my task.json against the task.json schema published in the Appendix I noticed some inconsistencies.

  1. beginsPattern/ endsPattern
    The schema defines them this way in the BackgroundMatcher interface

    beginsPattern?: string;
    endsPattern?: string;

    But in VS Code I can define them this way:

    "problemMatcher": {
      "base": "$tsc-watch",
      "background": {
        "activeOnStart": true,
        "beginsPattern": {
          "regexp": "(.*?)"
        },
        "endsPattern": {
          "regexp": "bundle generation complete"
        }
      }
    },

    So while the schema restricts the value to be string, it also accepts regexp in reality. Also IntelliSense provides this as a valid entry.

  2. Missing property "type"

    The TaskDescription interface defines the type like this

    type: 'shell' | 'process';

    It is therefore defined as a mandatory field. But in reality it is not. Otherwise it would not be possible to create a compound task as described in Compound Tasks

  3. Missing property "command"

    The TaskDescription interface defines the command like this

    command: string;

    It is therefore defined as a mandatory field. But in reality it is not. Otherwise it would not be possible to create a compound task as described in Compound Tasks

VS Code version: Code 1.98.1 (2fc07b8, 2025-03-10T15:38:08.854Z)
OS version: Windows_NT x64 10.0.22631
Modes:
Remote OS version: Linux x64 5.15.167.4-microsoft-standard-WSL2

Copy link

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.98.2. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

@fipro78
Copy link
Author

fipro78 commented Mar 14, 2025

An update of VS Code will probably not solve the issue. :)

IMHO the schema published at Appendix needs to be updated to match the current used version.

@meganrogge meganrogge added bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities tasks Task system issues labels Mar 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities tasks Task system issues
Projects
None yet
Development

No branches or pull requests

2 participants