Message ID | 20230825222711.2735745-2-adrian.freihofer@siemens.com |
---|---|
State | New |
Headers | show |
Series | devtool ide plugin | expand |
> -----Original Message----- > From: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org> On Behalf Of Adrian Freihofer > Sent: den 26 augusti 2023 00:26 > To: openembedded-core@lists.openembedded.org > Cc: Adrian Freihofer <adrian.freihofer@siemens.com> > Subject: [OE-core] [PATCH v3 01/13] vscode: add minimal configuration > > 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. > > Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> > --- > .gitignore | 2 ++ > .vscode/settings.json | 29 +++++++++++++++++++++++++++++ > 2 files changed, 31 insertions(+) > create mode 100644 .vscode/settings.json > > diff --git a/.gitignore b/.gitignore > index 8f48d452dab..f6ce090b5fc 100644 > --- a/.gitignore > +++ b/.gitignore > @@ -36,3 +36,5 @@ _toaster_clones/ > downloads/ > sstate-cache/ > toaster.sqlite > +.vscode/ > +vscode-bitbake-build/ > diff --git a/.vscode/settings.json b/.vscode/settings.json > new file mode 100644 > index 00000000000..4c941d47444 > --- /dev/null > +++ b/.vscode/settings.json > @@ -0,0 +1,29 @@ > +{ > + "files.watcherExclude": { > + "**/.git/**": true, > + "**/cache/**": true, > + "**/tmp*/**": true, > + "**/downloads/**": true, > + "**/sstate-cache/**": true, > + "**/vscode-bitbake-build/**": true, > + "**/workspace/sources/**": true You should include workspace/attic here and below as well. > + }, > + "files.exclude": { > + "**/.git/**": true, > + "**/cache/**": true, > + "**/tmp*/**": true, > + "**/downloads/**": true, > + "**/sstate-cache/**": true, > + "**/vscode-bitbake-build/**": true, > + "**/workspace/sources/**": true > + }, > + "python.analysis.exclude": [ > + "**/.git/**", > + "**/cache/**", > + "**/tmp*/**", > + "**/downloads/**", > + "**/sstate-cache/**", > + "**/vscode-bitbake-build/**", > + "**/workspace/sources/**" > + ] > +} > -- > 2.41.0 //Peter
On Sat, 2023-08-26 at 10:31 +0000, Peter Kjellerstedt wrote: > > -----Original Message----- > > From: > > openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org > > > On Behalf Of Adrian Freihofer > > Sent: den 26 augusti 2023 00:26 > > To: openembedded-core@lists.openembedded.org > > Cc: Adrian Freihofer <adrian.freihofer@siemens.com> > > Subject: [OE-core] [PATCH v3 01/13] vscode: add minimal > > configuration > > > > 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. > > > > Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> > > --- > > .gitignore | 2 ++ > > .vscode/settings.json | 29 +++++++++++++++++++++++++++++ > > 2 files changed, 31 insertions(+) > > create mode 100644 .vscode/settings.json > > > > diff --git a/.gitignore b/.gitignore > > index 8f48d452dab..f6ce090b5fc 100644 > > --- a/.gitignore > > +++ b/.gitignore > > @@ -36,3 +36,5 @@ _toaster_clones/ > > downloads/ > > sstate-cache/ > > toaster.sqlite > > +.vscode/ > > +vscode-bitbake-build/ > > diff --git a/.vscode/settings.json b/.vscode/settings.json > > new file mode 100644 > > index 00000000000..4c941d47444 > > --- /dev/null > > +++ b/.vscode/settings.json > > @@ -0,0 +1,29 @@ > > +{ > > + "files.watcherExclude": { > > + "**/.git/**": true, > > + "**/cache/**": true, > > + "**/tmp*/**": true, > > + "**/downloads/**": true, > > + "**/sstate-cache/**": true, > > + "**/vscode-bitbake-build/**": true, > > + "**/workspace/sources/**": true > > You should include workspace/attic here and below as well. Thank you. Fixed with v4. Regards, Adrian > > > + }, > > + "files.exclude": { > > + "**/.git/**": true, > > + "**/cache/**": true, > > + "**/tmp*/**": true, > > + "**/downloads/**": true, > > + "**/sstate-cache/**": true, > > + "**/vscode-bitbake-build/**": true, > > + "**/workspace/sources/**": true > > + }, > > + "python.analysis.exclude": [ > > + "**/.git/**", > > + "**/cache/**", > > + "**/tmp*/**", > > + "**/downloads/**", > > + "**/sstate-cache/**", > > + "**/vscode-bitbake-build/**", > > + "**/workspace/sources/**" > > + ] > > +} > > -- > > 2.41.0 > > //Peter >
diff --git a/.gitignore b/.gitignore index 8f48d452dab..f6ce090b5fc 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,5 @@ _toaster_clones/ downloads/ sstate-cache/ toaster.sqlite +.vscode/ +vscode-bitbake-build/ diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000000..4c941d47444 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,29 @@ +{ + "files.watcherExclude": { + "**/.git/**": true, + "**/cache/**": true, + "**/tmp*/**": true, + "**/downloads/**": true, + "**/sstate-cache/**": true, + "**/vscode-bitbake-build/**": true, + "**/workspace/sources/**": true + }, + "files.exclude": { + "**/.git/**": true, + "**/cache/**": true, + "**/tmp*/**": true, + "**/downloads/**": true, + "**/sstate-cache/**": true, + "**/vscode-bitbake-build/**": true, + "**/workspace/sources/**": true + }, + "python.analysis.exclude": [ + "**/.git/**", + "**/cache/**", + "**/tmp*/**", + "**/downloads/**", + "**/sstate-cache/**", + "**/vscode-bitbake-build/**", + "**/workspace/sources/**" + ] +}
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. Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> --- .gitignore | 2 ++ .vscode/settings.json | 29 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 .vscode/settings.json