Skip to content

problemMatcher $tsc-watch ignores error second time around #34412

@cloudkite

Description

@cloudkite
  • VSCode Version: Code 1.16.1 (27492b6, 2017-09-14T16:24:39.530Z)
  • OS Version: Darwin x64 15.6.0
  • typescript version: 2.5.2

Given the following tasks.json which finds all typescript errors in project

// tasks.json
{
  "version": "2.0.0",
  "tasks": [
    {
      "taskName": "tsc-watch",
      "type": "shell",
      "command": "./node_modules/.bin/tsc",
      "args": ["--noEmit", "-w", "-p", "."],
      "presentation": {
        "echo": true,
        "reveal": "silent",
        "focus": false,
        "panel": "shared"
      },
      "group":{
        "kind": "build",
        "isDefault": true
      },
      "isBackground": true,
      "problemMatcher": "$tsc-watch"
    }
  ]
}

an index.ts file:

// index.ts
import related from './related';

console.log(related(1))

an related.ts file:

// related.ts
export default function related(thing: number) {
  return thing
}

Steps to reproduce.

  1. Open related.ts without index.ts open.
  2. Change thing: number to thing: string = vscode correctly shows 1 error
  3. Undo change = vscode correctly shows 0 errors
  4. Redo change in Step 2 = vscode incorrectly still shows 0 errors

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugtasksTask system issuesverifiedVerification succeeded

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions