Merge #957
957: Fix and simplify "rustc-watch" problem matcher r=vemoo a=vemoo Cargo watch now always ends with "[Finished running ..." and includes some extra info. Make the pattern only match "[Finished running". Also add "cargo watch" and "cargo watch tests" that use the "rustc-watch" problem matcher. Change the "Build Lsp" to do "cargo check" because that's faster, and I think enought in this case, and make it use "rustc" problem matcher from the extension. Co-authored-by: Bernardo <berublan@gmail.com>
This commit is contained in:
commit
543f2ec8f6
55
.vscode/tasks.json
vendored
55
.vscode/tasks.json
vendored
@ -10,7 +10,10 @@
|
||||
"problemMatcher": {
|
||||
"owner": "typescript",
|
||||
"pattern": "$tsc",
|
||||
"fileLocation": ["relative", "${workspaceRoot}/editors/code"]
|
||||
"fileLocation": [
|
||||
"relative",
|
||||
"${workspaceRoot}/editors/code"
|
||||
]
|
||||
},
|
||||
"path": "editors/code/"
|
||||
},
|
||||
@ -18,30 +21,40 @@
|
||||
"label": "Build Lsp",
|
||||
"type": "shell",
|
||||
"command": "cargo build",
|
||||
"problemMatcher": {
|
||||
"owner": "rust",
|
||||
"fileLocation": ["relative", "${workspaceRoot}"],
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(warning|warn|error)(?:\\[(.*?)\\])?: (.*)$",
|
||||
"severity": 1,
|
||||
"code": 2,
|
||||
"message": 3
|
||||
},
|
||||
{
|
||||
"regexp": "^[\\s->=]*(.*?):(\\d*):(\\d*)\\s*$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"column": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
"problemMatcher": "$rustc"
|
||||
},
|
||||
{
|
||||
"label": "Build All",
|
||||
"group": "build",
|
||||
"dependsOn": ["Build Extension", "Build Lsp"],
|
||||
"dependsOn": [
|
||||
"Build Extension",
|
||||
"Build Lsp"
|
||||
],
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "cargo watch",
|
||||
"group": "build",
|
||||
"isBackground": true,
|
||||
"type": "shell",
|
||||
"command": "cargo",
|
||||
"args": [
|
||||
"watch"
|
||||
],
|
||||
"problemMatcher": "$rustc-watch"
|
||||
},
|
||||
{
|
||||
"label": "cargo watch tests",
|
||||
"group": "build",
|
||||
"isBackground": true,
|
||||
"type": "shell",
|
||||
"command": "cargo",
|
||||
"args": [
|
||||
"watch",
|
||||
"-x",
|
||||
"check --tests"
|
||||
],
|
||||
"problemMatcher": "$rustc-watch"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@ -215,8 +215,8 @@
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"background": {
|
||||
"beginsPattern": "^\\[Running ",
|
||||
"endsPattern": "^(\\[Finished running\\]|To learn more, run the command again with --verbose\\.)$"
|
||||
"beginsPattern": "^\\[Running\\b",
|
||||
"endsPattern": "^\\[Finished running\\b"
|
||||
},
|
||||
"pattern": "$rustc"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user