Bug 1423565 - Update tasks.json as per documentation. r?Build draft
authorJean-Yves Avenard <jyavenard@mozilla.com>
Wed, 06 Dec 2017 14:59:35 +0100
changeset 708257 837cd04b36e7e7b25bd7356792de95368801a64d
parent 708256 d47096827ee740841ac644fbaecd7b5dee7cfcb5
child 743157 30f8b6a76d01a7aedc2a324eaf2c277988bd3ac2
push id92347
push userbmo:jyavenard@mozilla.com
push dateWed, 06 Dec 2017 14:16:48 +0000
reviewersBuild
bugs1423565
milestone59.0a1
Bug 1423565 - Update tasks.json as per documentation. r?Build Most of the keywords used were deprecated and following versioning 0.1.0 even though it was marked as version 2.0.0. This also defines build-binaries as the default task, so that Command-Shift-B doesn't need any confirmation. MozReview-Commit-ID: UGDxqJYaFs
.vscode/tasks.json
--- a/.vscode/tasks.json
+++ b/.vscode/tasks.json
@@ -1,152 +1,186 @@
 {
     // See https://go.microsoft.com/fwlink/?LinkId=733558
     // for the documentation about the tasks.json format
     "version": "2.0.0",
+    "command": "${workspaceRoot}/mach",
     "windows": {
       "command": "\"\\mozilla-build\\start-shell.bat mach\""
     },
-    "osx": {
-      "command": "${workspaceRoot}/mach"
-    },
-    "linux": {
-      "command": "${workspaceRoot}/mach"
-    },
-    "isShellCommand": true,
     "args": ["--log-no-times"],
-    "showOutput": "silent",
     "echoCommand": true,
-    "suppressTaskName": false,
     "tasks": [
       {
-        "taskName": "clobber"
+        "label": "clobber-python",
+        "type":"shell",
+        "command": "${workspaceRoot}/mach",
+        "windows": {
+          "command": "\"\\mozilla-build\\start-shell.bat mach\""
+        },
+        "args": ["clobber", "python"],
+        "problemMatcher": []
       },
       {
-        "taskName": "clobber-python",
-        "suppressTaskName": true,
-        "args": ["clobber", "python"]
+        "label": "configure",
+        "type":"shell",
+        "problemMatcher": []
       },
       {
-        "taskName": "configure"
-      },
-      {
-        "taskName": "build",
-        "isBuildCommand": true,
+        "label": "build",
+        "type":"shell",
         "problemMatcher": {
           "owner": "cpp",
           "fileLocation": "absolute",
           "pattern": {
-            "regexp": "^.*?tools([^\\s]*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
+            "regexp": "^.*?([^\\s]*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
             "file": 1,
             "line": 2,
             "column": 3,
             "severity": 4,
             "message": 5
           }
         }
       },
       {
-        "taskName": "build-binaries",
-        "suppressTaskName": true,
-        "args": ["build", "binaries"],
+        "label": "build-binaries",
+        "type":"shell",
+        "command": "${workspaceRoot}/mach",
+        "windows": {
+          "command": "\"\\mozilla-build\\start-shell.bat mach\""
+        },
+        "args": ["--log-no-times", "build", "binaries"],
+        "problemMatcher": {
+          "owner": "cpp",
+          "fileLocation": "absolute",
+          "pattern": {
+            "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
+            "file": 1,
+            "line": 2,
+            "column": 3,
+            "severity": 4,
+            "message": 5
+          }
+        },
+        "group": {
+            "kind": "build",
+            "isDefault": true
+        }
+      },
+      {
+        "label": "build-faster",
+        "type":"shell",
+        "command": "${workspaceRoot}/mach",
+        "windows": {
+          "command": "\"\\mozilla-build\\start-shell.bat mach\""
+        },
+        "args": ["--log-no-times", "build", "faster"],
         "problemMatcher": {
           "owner": "cpp",
           "fileLocation": "absolute",
           "pattern": {
             "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
             "file": 1,
             "line": 2,
             "column": 3,
             "severity": 4,
             "message": 5
           }
         }
       },
       {
-        "taskName": "build-faster",
-        "suppressTaskName": true,
-        "args": ["build", "faster"],
-        "problemMatcher": {
-          "owner": "cpp",
-          "fileLocation": "absolute",
-          "pattern": {
-            "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
-            "file": 1,
-            "line": 2,
-            "column": 3,
-            "severity": 4,
-            "message": 5
-          }
-        }
+        "label": "run",
+        "type":"shell",
+        "args": ["-purgecaches"],
+        "problemMatcher": []
       },
       {
-        "taskName": "run",
-        "args": ["-purgecaches"],
-        "showOutput": "always"
-      },
-      {
-        "taskName": "lint-wo",
-        "suppressTaskName": true,
+        "label": "lint-wo",
+        "type":"shell",
+        "command": "${workspaceRoot}/mach",
+        "windows": {
+          "command": "\"\\mozilla-build\\start-shell.bat mach\""
+        },
         "args": ["lint", "-wo"],
         "problemMatcher": ["$eslint-stylish"]
       },
       {
-        "taskName": "eslint",
+        "label": "eslint",
+        "type": "shell",
         "problemMatcher": ["$eslint-stylish"]
       },
       {
-        "taskName": "eslint-fix",
-        "suppressTaskName": true,
+        "label": "eslint-fix",
+        "type":"shell",
+        "command": "${workspaceRoot}/mach",
+        "windows": {
+          "command": "\"\\mozilla-build\\start-shell.bat mach\""
+        },
         "args": ["eslint", "--fix", "${file}"],
         "problemMatcher": ["$eslint-stylish"]
       },
       {
-        "taskName": "test",
+        "label": "test",
+        "type":"shell",
         "args": ["${relativeFile}"],
-        "isTestCommand": true,
-        "showOutput": "always"
+        "group":"test",
+        "presentation": {
+            "reveal": "always",
+            "panel": "new"
+        }
       },
       {
-        "taskName": "mochitest",
+        "label": "mochitest",
+        "type":"shell",
         "args": ["${relativeFile}"],
-        "showOutput": "always",
         "problemMatcher": {
           "fileLocation": ["relative", "${workspaceRoot}"],
           "pattern": {
               "regexp": "^.*\\s+(TEST-UNEXPECTED-FAIL|TEST-UNEXPECTED-PASS)\\s+\\|\\s+([^\\s]*)\\s+\\|\\s+(.*)$",
               "severity": 1,
               "file": 2,
               "message": 3
           }
+        },
+        "presentation": {
+            "reveal": "always",
+            "panel": "new"
         }
       },
       {
-        "taskName": "reftest",
+        "label": "reftest",
+        "type":"shell",
         "args": ["${relativeFile}"],
-        "showOutput": "always",
         "problemMatcher": {
           "fileLocation": ["absolute"],
           "pattern": {
               "regexp": "^.*\\s+(TEST-UNEXPECTED-FAIL|TEST-UNEXPECTED-PASS)\\s+\\|\\s+file:\/\/([^\\s]*)\\s+==\\s+[^\\s]*\\s+\\|\\s+(.*)$",
               "severity": 1,
               "file": 2,
               "message": 3
           }
+        },
+        "presentation": {
+            "reveal": "always",
+            "panel": "new"
         }
       },
       {
-        "taskName": "xpcshell-test",
+        "label": "xpcshell-test",
+        "type":"shell",
         "args": ["${relativeFile}", "--sequential"],
-        "showOutput": "always",
         "problemMatcher": {
           "fileLocation": ["relative", "${workspaceRoot}"],
           "pattern": {
               "regexp": "^.*\\s+(FAIL|ERROR)\\s+\\[([^\\s]*)\\s+:\\s+(\\d+)\\]\\s+(.*)$",
               "severity": 1,
               "file": 2,
               "location": 3,
               "message": 4
           }
+        },
+        "presentation": {
+              "reveal": "always",
+              "panel": "new"
         }
       }
     ]
 }