Skip to content

Commit

Permalink
vscode: add minimal configuration
Browse files Browse the repository at this point in the history
It is essential to configure VSCode indexer plugins to ignore the build
folder of bitbake. Otherwise, the indexer plugins run with 100% CPU load
until an OOM exception occurs. In practice, this makes VSCode more or
less unusable for working with Yocto until a file like the one added by
this commit is deployed before VSCode starts. From the user's point of
view, it is not obvious why the system runs at 100% CPU load and
eventually crashes.

It is even more misleading that VSCode starts the indexers immediately,
but does not stop or reconfigure them when the ignore list is updated.
In practice, this means that every time the ignore list is changed,
VSCode immediately starts indexing the build folder until the OOM
exception stops it. Depending on the system's OOM handler, the entire
build machine may crash.
Particularly annoying is the Python plugin that ignores the general
ignore list and requires an extra ignore section.

The settings are suitable for workflows like bitbake, devtool modify,
devtool reset. The settings are not intended to work on the source code
of a recipe. It is assumed that a separate instance of VSCode is used
per workspace folder. These per workspace instances can have different
settings depending on the details of the sources that come with the
recipe. The new devtool ide plugin will generate settings to match this.

Signed-off-by: Adrian Freihofer <[email protected]>
  • Loading branch information
afreof authored and deribaucourt committed Sep 27, 2023
1 parent 77d5805 commit 2a86303
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,5 @@ _toaster_clones/
downloads/
sstate-cache/
toaster.sqlite
.vscode/
vscode-bitbake-build/
32 changes: 32 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"files.watcherExclude": {
"**/.git/**": true,
"**/cache/**": true,
"**/tmp*/**": true,
"**/downloads/**": true,
"**/sstate-cache/**": true,
"**/vscode-bitbake-build/**": true,
"**/workspace/sources/**": true,
"**/workspace/attic/**": true
},
"files.exclude": {
"**/.git/**": true,
"**/cache/**": true,
"**/tmp*/**": true,
"**/downloads/**": true,
"**/sstate-cache/**": true,
"**/vscode-bitbake-build/**": true,
"**/workspace/sources/**": true,
"**/workspace/attic/**": true
},
"python.analysis.exclude": [
"**/.git/**",
"**/cache/**",
"**/tmp*/**",
"**/downloads/**",
"**/sstate-cache/**",
"**/vscode-bitbake-build/**",
"**/workspace/sources/**",
"**/workspace/attic/**"
]
}

0 comments on commit 2a86303

Please sign in to comment.