mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
Documentation: Update and simplify VSCode Task recommendation
With these you'll only need 3 tasks to cover lagom and all of normal build and launch with just 3 Tasks and two option menus.
This commit is contained in:
parent
7613586097
commit
1bbdce7e81
Notes:
sideshowbarker
2024-07-18 01:28:08 +09:00
Author: https://github.com/Hendiadyoin1 Commit: https://github.com/SerenityOS/serenity/commit/1bbdce7e81e Pull-request: https://github.com/SerenityOS/serenity/pull/10776 Reviewed-by: https://github.com/ADKaster Reviewed-by: https://github.com/kleinesfilmroellchen ✅ Reviewed-by: https://github.com/linusg
1 changed files with 146 additions and 104 deletions
|
@ -129,44 +129,30 @@ These belong in the `.vscode/settings.json` of Serenity.
|
||||||
|
|
||||||
### Custom Tasks
|
### Custom Tasks
|
||||||
|
|
||||||
You can create custom tasks (`.vscode/tasks.json`) to quickly compile Serenity. The following are two example tasks, a "just build" task and a "build and run" task for i686 that also give you error highlighting:
|
You can create custom tasks (`.vscode/tasks.json`) to quickly compile Serenity.
|
||||||
|
The following three example tasks should suffice in most situations, and allow you to specify the build system to use, as well as give you error highlighting.
|
||||||
|
|
||||||
|
Note: The Assertion und KUBSan Problem matchers will only run after you have closed qemu.
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>tasks.json</summary>
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"tasks": [
|
"tasks": [
|
||||||
{
|
{
|
||||||
"label": "build",
|
"label": "build lagom",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"problemMatcher": [
|
"problemMatcher":[{
|
||||||
{
|
|
||||||
"base": "$gcc",
|
"base": "$gcc",
|
||||||
"fileLocation": [
|
"fileLocation": ["relative","${workspaceFolder}/Build/lagom"]
|
||||||
"relative",
|
}],
|
||||||
"${workspaceFolder}/Build/i686"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"source": "gcc",
|
|
||||||
"fileLocation": [
|
|
||||||
"relative",
|
|
||||||
"${workspaceFolder}/Build/i686"
|
|
||||||
],
|
|
||||||
"pattern": [
|
|
||||||
{
|
|
||||||
"regexp": "^([^\\s]*\\.S):(\\d*): (.*)$",
|
|
||||||
"file": 1,
|
|
||||||
"location": 2,
|
|
||||||
"message": 3
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"command": [
|
"command": [
|
||||||
"bash"
|
"bash"
|
||||||
],
|
],
|
||||||
"args": [
|
"args": [
|
||||||
"-c",
|
"-c",
|
||||||
"\"Meta/serenity.sh image\""
|
"\"Meta/serenity.sh build lagom\""
|
||||||
],
|
],
|
||||||
"presentation": {
|
"presentation": {
|
||||||
"echo": true,
|
"echo": true,
|
||||||
|
@ -179,36 +165,80 @@ You can create custom tasks (`.vscode/tasks.json`) to quickly compile Serenity.
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "launch",
|
"label": "build",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"linux": {
|
|
||||||
"command": "bash",
|
"command": "bash",
|
||||||
"args": [
|
"args": [
|
||||||
"-c",
|
"-c",
|
||||||
"\"Meta/serenity.sh run\""
|
"Meta/serenity.sh build ${input:arch} ${input:compiler}"
|
||||||
|
],
|
||||||
|
"options": {
|
||||||
|
"env": {
|
||||||
|
"SERENITY_RAM_SIZE": "4G",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"problemMatcher": [
|
||||||
|
{
|
||||||
|
"base": "$gcc",
|
||||||
|
"fileLocation": [
|
||||||
|
"relative",
|
||||||
|
// FIXME: Clang uses ${input:arch}clang
|
||||||
|
"${workspaceFolder}/Build/${input:arch}"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"source": "gcc",
|
||||||
|
"fileLocation": [
|
||||||
|
"relative",
|
||||||
|
// FIXME: Clang uses ${input:arch}clang
|
||||||
|
"${workspaceFolder}/Build/${input:arch}"
|
||||||
|
],
|
||||||
|
"pattern": [
|
||||||
|
{
|
||||||
|
"regexp": "^([^\\s]*\\.S):(\\d*): (.*)$",
|
||||||
|
"file": 1,
|
||||||
|
"location": 2,
|
||||||
|
"message": 3
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "launch",
|
||||||
|
"type": "shell",
|
||||||
|
"command": "bash",
|
||||||
|
"args": [
|
||||||
|
"-c",
|
||||||
|
"Meta/serenity.sh run ${input:arch} ${input:compiler}"
|
||||||
],
|
],
|
||||||
"options": {
|
"options": {
|
||||||
"env": {
|
"env": {
|
||||||
// Put your custom run configuration here, e.g. SERENITY_RAM_SIZE
|
// Put your custom run configuration here, e.g. SERENITY_RAM_SIZE
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"problemMatcher": [
|
"problemMatcher": [
|
||||||
{
|
{
|
||||||
"source": "Assertion Failed",
|
"base": "$gcc",
|
||||||
"fileLocation": [
|
"fileLocation": [
|
||||||
"relative",
|
"relative",
|
||||||
"${workspaceFolder}/Build/i686"
|
// FIXME: Clang uses ${input:arch}clang
|
||||||
|
"${workspaceFolder}/Build/${input:arch}"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"source": "gcc",
|
||||||
|
"fileLocation": [
|
||||||
|
"relative",
|
||||||
|
// FIXME: Clang uses ${input:arch}clang
|
||||||
|
"${workspaceFolder}/Build/${input:arch}"
|
||||||
],
|
],
|
||||||
"pattern": [
|
"pattern": [
|
||||||
{
|
{
|
||||||
"regexp": "ASSERTION FAILED: (.*)$",
|
"regexp": "^([^\\s]*\\.S):(\\d*): (.*)$",
|
||||||
"message": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"regexp": "^((?:.*)\\.(h|cpp|c|S)):(\\d*)$",
|
|
||||||
"file": 1,
|
"file": 1,
|
||||||
"location":3
|
"location": 2,
|
||||||
|
"message": 3
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -233,43 +263,55 @@ You can create custom tasks (`.vscode/tasks.json`) to quickly compile Serenity.
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"base": "$gcc",
|
"source": "Assertion Failed",
|
||||||
"fileLocation": [
|
"owner": "cpp",
|
||||||
"relative",
|
|
||||||
"${workspaceFolder}/Build/i686"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"source": "gcc",
|
|
||||||
"fileLocation": [
|
|
||||||
"relative",
|
|
||||||
"${workspaceFolder}/Build/i686"
|
|
||||||
],
|
|
||||||
"pattern": [
|
"pattern": [
|
||||||
{
|
{
|
||||||
"regexp": "^([^\\s]*\\.S):(\\d*): (.*)$",
|
"regexp": "ASSERTION FAILED: (.*)$",
|
||||||
|
"message": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"regexp": "^((?:.*)\\.(h|cpp|c|S)):(\\d*)$",
|
||||||
"file":1,
|
"file":1,
|
||||||
"location": 2,
|
"location":3
|
||||||
"message": 3
|
}
|
||||||
|
],
|
||||||
|
"fileLocation": [
|
||||||
|
"relative",
|
||||||
|
// FIXME: Clang uses ${input:arch}clang
|
||||||
|
"${workspaceFolder}/Build/${input:arch}"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"presentation": {
|
"inputs": [
|
||||||
"echo": true,
|
{
|
||||||
"reveal": "always",
|
"id": "compiler",
|
||||||
"group": "run",
|
"description": "Compiler to use",
|
||||||
"focus": false,
|
"type": "pickString",
|
||||||
"panel": "shared",
|
"default": "GNU",
|
||||||
"showReuseMessage": true,
|
"options": [
|
||||||
"clear": true
|
"GNU",
|
||||||
}
|
"Clang"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"id": "arch",
|
||||||
|
"description": "Architecture to compile for",
|
||||||
|
"type": "pickString",
|
||||||
|
"default": "i686",
|
||||||
|
"options": [
|
||||||
|
"i686",
|
||||||
|
"x86_64",
|
||||||
|
"aarch64"
|
||||||
|
]
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
This can easily be adopted into x86_64 by appending the architecture to the serenity.sh commands.
|
</details>
|
||||||
|
|
||||||
### License snippet
|
### License snippet
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue