Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Adrian Freihofer <adrian.freihofer@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Adrian Freihofer <adrian.freihofer@siemens.com>
Subject: [PATCH v4 01/13] vscode: add minimal configuration
Date: Sun, 27 Aug 2023 21:29:43 +0200	[thread overview]
Message-ID: <20230827193200.4083340-2-adrian.freihofer@siemens.com> (raw)
In-Reply-To: <20230827193200.4083340-1-adrian.freihofer@siemens.com>

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 <adrian.freihofer@siemens.com>
---
 .gitignore            |  2 ++
 .vscode/settings.json | 32 ++++++++++++++++++++++++++++++++
 2 files changed, 34 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..517a86d1bfa
--- /dev/null
+++ b/.vscode/settings.json
@@ -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/**"
+    ]
+}
-- 
2.41.0



  reply	other threads:[~2023-08-27 19:32 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-27 19:29 [PATCH v4 00/13] devtool ide plugin Adrian Freihofer
2023-08-27 19:29 ` Adrian Freihofer [this message]
2023-08-27 19:29 ` [PATCH v4 02/13] cmake.bbclass: refactor cmake args Adrian Freihofer
2023-08-27 19:29 ` [PATCH v4 03/13] cmake.bbclass: cleanup spaces and tabs Adrian Freihofer
2023-08-27 19:29 ` [PATCH v4 04/13] cmake.bbclass: support qemu Adrian Freihofer
2023-08-27 19:29 ` [PATCH v4 05/13] devtool: new ide plugin Adrian Freihofer
2023-08-27 19:29 ` [PATCH v4 06/13] tests: add a C++ example recipe Adrian Freihofer
2023-08-27 19:29 ` [PATCH v4 07/13] cmake-example: workaround for pseudo breakeage Adrian Freihofer
2023-08-27 19:29 ` [PATCH v4 08/13] refactor: make multiprocess_launch callable without d Adrian Freihofer
2023-08-27 19:29 ` [PATCH v4 09/13] refactor: make strip_execs " Adrian Freihofer
2023-08-27 19:29 ` [PATCH v4 10/13] devtool: refactor deploy-target Adrian Freihofer
2023-08-27 19:29 ` [PATCH v4 11/13] devtool: ide make deploy-target quicker Adrian Freihofer
2023-08-27 19:29 ` [PATCH v4 12/13] oe-selftest devtool: ide tests Adrian Freihofer
2023-08-27 19:29 ` [PATCH v4 13/13] docs: cover devtool ide Adrian Freihofer
2023-08-30 14:36 ` [OE-core] [PATCH v4 00/13] devtool ide plugin Alexandre Belloni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230827193200.4083340-2-adrian.freihofer@siemens.com \
    --to=adrian.freihofer@gmail.com \
    --cc=adrian.freihofer@siemens.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox