From patchwork Tue Feb 13 22:18:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 39269 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id DDD47C4829A for ; Tue, 13 Feb 2024 22:19:07 +0000 (UTC) Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.47]) by mx.groups.io with SMTP id smtpd.web10.27559.1707862745612286159 for ; Tue, 13 Feb 2024 14:19:05 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=cJLmOFeb; spf=pass (domain: gmail.com, ip: 209.85.208.47, mailfrom: adrian.freihofer@gmail.com) Received: by mail-ed1-f47.google.com with SMTP id 4fb4d7f45d1cf-56001d49cc5so6092759a12.2 for ; Tue, 13 Feb 2024 14:19:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707862744; x=1708467544; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=kW7RF5+tUIR7tQtpfsI/n7U8l/cBXYZtWq1OuhWhGTE=; b=cJLmOFebMURKI7pfiFMbIt1GUfj/aH9IGZeUTKFjW7DFp8WR/G5vzj+/0f6cKQFC1a A2hjPXdD6/mQZKyVZGthOLkdp6GZ/P2cwOQWJkaIyTpuPNAHr0+5YMDcFRxr4ZQAWUai CqXWai4KZQWuhT6pWAqoc7522b1Mo0GLZ9HsH49ss3v+UVPZemvsw8ipc9dzsssw0FBm WV3bQbpv9EzelpTwXSqs20+8swEjqyTh7PFZK6VrtJMCff7PLKmjtBuLV6Eyfc0cJjsL qaEFoDfI8W10K4kVsAiFag63cIXkke30rsfmAoGTlkP/kQbrpUQPjAbtlyi+nFPj2Dgd XdHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707862744; x=1708467544; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kW7RF5+tUIR7tQtpfsI/n7U8l/cBXYZtWq1OuhWhGTE=; b=wnCR/pmDruB8Sb2auS1JOD1bcOu3YBJxGOVVR3uggpzWlu4c7klkhzwiS37rClzbX0 az/f2PvUV28eGU3XJFTPSkExqG72DfYc5Jtnqm/weEjXWXBMdtitOaDxx4T5pj2QyCr0 X1judFrcBBBQIN/fCYrZ0WbfcCn5oN56mcZuNjeFpULnXrLgSixV3ymWTL5gw14Wuj0K ihtfLdUaQ85n3O9D+VoUsQao/gA9dughNRcITdZHF+iXTZax+y3RIL4it1ka+6ginfiY 9xN2blUSP0Q6+3nTcaTnZca0A6p+RhvGpbx642kHDZFzfviTAXCz+cXzvkvg8EHSqcYa NoDw== X-Gm-Message-State: AOJu0YzZZBcxiOXxdehKg63a7nro3VMY/Dr6kGbTC3PkyC77jWJpyihg vWrwaZHULpyS++u4BeaN6ayC/qc/eNbK+kwwYSXpt3iSB1N5p+/4t+NHZZmZ X-Google-Smtp-Source: AGHT+IFh1TDD5I9gnf5SwSjKg08XAqls6INKp4N5LfkvCHdb0SxTKQYp/5scLlz3bUXR94hBWXLuPA== X-Received: by 2002:aa7:c991:0:b0:560:269c:214f with SMTP id c17-20020aa7c991000000b00560269c214fmr702096edt.19.1707862743854; Tue, 13 Feb 2024 14:19:03 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id k23-20020a05640212d700b005612987a525sm4027137edx.89.2024.02.13.14.19.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 14:19:03 -0800 (PST) From: Adrian Freihofer X-Google-Original-From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Cc: Adrian Freihofer Subject: [PATCH v2 1/4] vscode: drop .vscode folder Date: Tue, 13 Feb 2024 23:18:05 +0100 Message-ID: <20240213221846.109260-2-adrian.freihofer@siemens.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240213221846.109260-1-adrian.freihofer@siemens.com> References: <20240213221846.109260-1-adrian.freihofer@siemens.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 13 Feb 2024 22:19:07 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/195440 There is a new official bitbake plugin: https://marketplace.visualstudio.com/items?itemName=yocto-project.yocto-bitbake This plugin automatically updates the .vscode/settings.json file. Having the settings.json file in git and a plugin which modifies this file is not ideal. It can lead to anoying situations especially when working with git. For example a git stash reverts the settings which are automatically applied by the plugin. While git stashed the settings.json file the plugin immediately changes the file again and tries to run bitbake based on the newly generated settings. When git does a stash pop the restored settings.json file conflicts with the new settigns.json file which has been generated while the git stash took place. Therefore this patch removes the .vscode folder from git. Removing the settings.json leads to other issues as already described in the commit message of 5ff688fe29. But we still need another solution where the settings.json file is not in Git. Discussion is here: https://github.com/yoctoproject/vscode-bitbake/issues/95 Signed-off-by: Adrian Freihofer --- .gitignore | 3 +-- .vscode/settings.json | 32 -------------------------------- 2 files changed, 1 insertion(+), 34 deletions(-) delete mode 100644 .vscode/settings.json diff --git a/.gitignore b/.gitignore index f6ce090b5fc..ca9b5c8f515 100644 --- a/.gitignore +++ b/.gitignore @@ -36,5 +36,4 @@ _toaster_clones/ downloads/ sstate-cache/ toaster.sqlite -.vscode/ -vscode-bitbake-build/ +.vscode/* diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 517a86d1bfa..00000000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "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/**" - ] -} From patchwork Tue Feb 13 22:18:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 39270 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id E9A01C48BC1 for ; Tue, 13 Feb 2024 22:19:07 +0000 (UTC) Received: from mail-ed1-f52.google.com (mail-ed1-f52.google.com [209.85.208.52]) by mx.groups.io with SMTP id smtpd.web10.27560.1707862746535307570 for ; Tue, 13 Feb 2024 14:19:06 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=KGkqr2K0; spf=pass (domain: gmail.com, ip: 209.85.208.52, mailfrom: adrian.freihofer@gmail.com) Received: by mail-ed1-f52.google.com with SMTP id 4fb4d7f45d1cf-561587ce966so330649a12.1 for ; Tue, 13 Feb 2024 14:19:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707862745; x=1708467545; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7KkiH9Dcv4fI8DL20xuDzNm1v6LbwAhrAagg3ZEQzCU=; b=KGkqr2K0NKVBcxkBuPwV+lc19TvrefOIUd0wImUKazUNXetBpkxNItAZ8K56ihUINe y4a3Y/fmmZftc0RBe1XpHBy/fPAD7cWHBHPtzwS1ZvEoA0viX1pSDw6iCezYc/9rQj5k 8kUruEDgcbC04OVq8nkCEZ1GCHGPMGcgQceW5DatMPh75imQl/cjjc15uX+x+hUxN50K UMhWvFNCA37oRgxyrmwz1kzxoC4nXDBN0+cZSm7hKbrofd9GSeJH/64/aixIMe4vDY9K D3qJ1xIme/vUBXmgSmScX5WDfaigEuouK8sUaI0lxF+GArK5ozbjrtuVPNHoaXDLkrf9 6ZxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707862745; x=1708467545; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7KkiH9Dcv4fI8DL20xuDzNm1v6LbwAhrAagg3ZEQzCU=; b=i1wUgzZJRRQaD10JJWoxuKMy4/2xVF987lQmlwgWsBwoLMDl4GMrTxzmwDK2u6ANVd NUVC7BGUQLhl3VliGPsglgQjWxu/qtU0zcwX1TrMaPQRCd9lrKyrviuGzvF4JZpGNAUm hG2OK6Dc/gW7N8l8r7WmO6uZoG6rVT55EhpJNRlcY4qzd1fBSALKYzY/aAb1wY+uRjtI duzViTVfVGb6M72GedOprxnQC/GS4qMnJrD7sz9yZbcMxj8jQNHAy66QJeRT380V06+E nT8sBOmSQ1Xt+Zt3fhqwwMbOaVVPSMeRkG8ZVw+07+sLivgtO9xSwtNjxp94lSGbWuwq qRcA== X-Gm-Message-State: AOJu0YyxifC254daD7PWncppDlZUv+z6Rde/b2oy6KRdb/qOYTJ1IYLE kZ2/WnP88IajpYG9WuVMQ3UVs8Mg9wfCS8Egx1f+Xe/f76E+W6mq0WT/iWSj X-Google-Smtp-Source: AGHT+IFjlE0de3echhcMLu2Cl3qVFgIAOYgXe6TPGv9yegxK1H7oYb4lbhXiGMV+TpGzFILhpweMEg== X-Received: by 2002:a05:6402:530d:b0:561:f0f1:5e01 with SMTP id eo13-20020a056402530d00b00561f0f15e01mr132989edb.10.1707862744619; Tue, 13 Feb 2024 14:19:04 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id k23-20020a05640212d700b005612987a525sm4027137edx.89.2024.02.13.14.19.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 14:19:04 -0800 (PST) From: Adrian Freihofer X-Google-Original-From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Cc: Adrian Freihofer Subject: [PATCH v2 2/4] oe-init-build-env: add OEINIT variable Date: Tue, 13 Feb 2024 23:18:06 +0100 Message-ID: <20240213221846.109260-3-adrian.freihofer@siemens.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240213221846.109260-1-adrian.freihofer@siemens.com> References: <20240213221846.109260-1-adrian.freihofer@siemens.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 13 Feb 2024 22:19:07 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/195441 Introduce a new OEINIT variable which can be used by templates. OEINIT refers to the directory where the oe-init-build-env script is. The template engine needs this information to generate the .vscode directory and the settings.json file. For the most basic use case where only poky is used, the build folder and the .vscode folder can be generated in poky. That means OEINIT = OEROOT --> poky. If more layers are used or a different folder structure is used the build folder and the .vscode folder should probably be at a different location, where the OEINIT variable is required. One use case is a layer structure like this: my-top-dir <-- OEINIT build <-- BUILDDIR (=BBPATH) .vscode settings.json oe-init-build-env my-layer meta-oe poky <-- OEROOT oe-buildenv-internal oe-setup-builddir Having this infrastructure in the core allows for example overriding the oe-init-build-env script in my-top-dir like this: OEINIT=$(dirname "$THIS_SCRIPT") OEINIT=$(readlink -f "$OEINIT") OEROOT="$OEINIT/poky" Many different folder structures should be supported by this concept. Signed-off-by: Adrian Freihofer --- oe-init-build-env | 6 ++++++ scripts/oe-setup-builddir | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/oe-init-build-env b/oe-init-build-env index 38333ab8582..14917a425ee 100755 --- a/oe-init-build-env +++ b/oe-init-build-env @@ -41,12 +41,18 @@ if [ -z "$OEROOT" ]; then fi unset THIS_SCRIPT +# OEINIT is where the oe-init-build-env script is located. +# If this script is provided by a different layer OEINIT != OEROOT. +OEINIT="$OEROOT" + +export OEINIT export OEROOT . "$OEROOT"/scripts/oe-buildenv-internal && TEMPLATECONF="$TEMPLATECONF" "$OEROOT"/scripts/oe-setup-builddir || { unset OEROOT return 1 } +unset OEINIT unset OEROOT [ -z "$BUILDDIR" ] || cd "$BUILDDIR" diff --git a/scripts/oe-setup-builddir b/scripts/oe-setup-builddir index 1b5dc55743e..dfd9acbb2cf 100755 --- a/scripts/oe-setup-builddir +++ b/scripts/oe-setup-builddir @@ -93,7 +93,8 @@ EOM # bitbake without the init script after the first run. # ##COREBASE## is deprecated as its meaning was inconsistent, but continue # to replace it for compatibility. - sed -e "s|##OEROOT##|$OEROOT|g" \ + sed -e "s|##OEINIT##|$OEINIT|g" \ + -e "s|##OEROOT##|$OEROOT|g" \ -e "s|##COREBASE##|$OEROOT|g" \ "$OECORELAYERCONF" > "$BUILDDIR/conf/bblayers.conf" SHOWYPDOC=yes From patchwork Tue Feb 13 22:18:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 39272 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id BA5DFC4829F for ; Tue, 13 Feb 2024 22:19:17 +0000 (UTC) Received: from mail-ed1-f49.google.com (mail-ed1-f49.google.com [209.85.208.49]) by mx.groups.io with SMTP id smtpd.web11.27672.1707862749205914141 for ; Tue, 13 Feb 2024 14:19:09 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=K1ybpzu1; spf=pass (domain: gmail.com, ip: 209.85.208.49, mailfrom: adrian.freihofer@gmail.com) Received: by mail-ed1-f49.google.com with SMTP id 4fb4d7f45d1cf-56001b47285so2059068a12.1 for ; Tue, 13 Feb 2024 14:19:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707862747; x=1708467547; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VS+n4/G2yNK/ICtCRJSV/+fAaVHaZWznyr39Q2sLUdY=; b=K1ybpzu1hCjjKepSv6wrtlwG79uot2ko8eT+3Rt3NaT6IOAJ91ZJOOjJn94NTuFNTv qCr6RpW9/BosPhBDBcjxLmEWUuc/JSajgDK/qmpMFSb9Jmnj2py6sTmdjzsMVFx/uUOf kZHUGyX4tJgyaPOHh1z41uh4cPG9wDGAGBwVgSE4QUFnW8dUR/tmsEUWSV/Oik1HOQ6j D9pszRgVkSZbgJlOqpjOyIc3k3VqRSAywPdEmv2xoQzGqfgFXvkPunT3PpGmkEQkT7y1 tL0ZcEWWvxq7bwF6VAKMFG02O88eH7WgtIjafqQayNM3T7dKWb8eGFTPyMuySPquZPgQ 0Spw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707862747; x=1708467547; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VS+n4/G2yNK/ICtCRJSV/+fAaVHaZWznyr39Q2sLUdY=; b=VPD+RWwTLEiVY9cwmE2zxOg3nlJJYW8zmjDUnRHxV0Fc/tu/t9xhYgDWUh7o1Wujb6 YWGN5A932gdHwsyj3YTr8p36imfIsH3oLD8LJx9GHkamBbWIegfyM9xRZKQcHevCnjUG b7u2pBu65bg6DK89PpkQKAHFuYVAZ3MqWIOpcZpGvVDcoYJXuVeTKRksr7Ic83Ld4mV0 9fAMQtMwfpe98MX+hwRv3LuXf727Fb0/6WNlHti2N0OQK3ogbNk9ECBx9RTuqkAFOmAe 1XsYjM7Wast0uBTO3646/QtN70iOvu3kfKOHUBvfmHbEUhi4mgwMnR9cLr7M2kE/b7Hs O5Og== X-Gm-Message-State: AOJu0YynqKjDBdLlnA4lIrnVCRtmnjYMa1j05pM2DYNVh3p0igbXjrwU o67P4WsbeA0t013zchyC4xzoADxZSbUy6HdQPUmIvv7zkyNjOWkrQPouT3xa X-Google-Smtp-Source: AGHT+IGkdAoUQvYk7k1n0oh/q6DVItApVlRSFFbWbi8pe+i1xorTN1NhXFGZ/RVerZT16O7X+1O5zA== X-Received: by 2002:aa7:da0e:0:b0:561:f768:e286 with SMTP id r14-20020aa7da0e000000b00561f768e286mr657384eds.3.1707862745189; Tue, 13 Feb 2024 14:19:05 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id k23-20020a05640212d700b005612987a525sm4027137edx.89.2024.02.13.14.19.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 14:19:04 -0800 (PST) From: Adrian Freihofer X-Google-Original-From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Cc: Adrian Freihofer Subject: [PATCH v2 3/4] oe-init-build-env: generate .vscode from template Date: Tue, 13 Feb 2024 23:18:07 +0100 Message-ID: <20240213221846.109260-4-adrian.freihofer@siemens.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240213221846.109260-1-adrian.freihofer@siemens.com> References: <20240213221846.109260-1-adrian.freihofer@siemens.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 13 Feb 2024 22:19:17 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/195442 Provide a reasonable default configuration for VSCode and the yocto.bitbake extension as it is provided by templates. The configuration is only generated if VSCode is installed. Currently, VSCode is one of many popular editors for Yocto/OE. Removing the check for code would result in the .vscode configuration being generated by e.g. oe-selftest or for users not using VSCode. If it should prove useful, the check can be removed later. Supporting different layers and build folder structures is supported e.g. by overriding the oe-init-build-env script and the templates in a custom layer. Signed-off-by: Adrian Freihofer --- .../default/vscode/settings.json.sample | 47 +++++++++++++++++++ scripts/oe-setup-builddir | 43 +++++++++++++++++ 2 files changed, 90 insertions(+) create mode 100644 meta-poky/conf/templates/default/vscode/settings.json.sample diff --git a/meta-poky/conf/templates/default/vscode/settings.json.sample b/meta-poky/conf/templates/default/vscode/settings.json.sample new file mode 100644 index 00000000000..4439f5f5c5c --- /dev/null +++ b/meta-poky/conf/templates/default/vscode/settings.json.sample @@ -0,0 +1,47 @@ +{ + "bitbake.pathToBitbakeFolder": "##OEROOT##/bitbake", + "bitbake.pathToBuildFolder": "##BUILDDIR##", + "bitbake.pathToEnvScript": "##OEINIT##/oe-init-build-env", + "files.exclude": { + "**/.git/**": true, + "**/_build/**": true, + "**/buildhistory/**": true, + "**/cache/**": true, + "**/downloads/**": true, + "**/node_modules/**": true, + "**/oe-logs/**": true, + "**/oe-workdir/**": true, + "**/sstate-cache/**": true, + "**/tmp*/**": true, + "**/workspace/attic/**": true, + "**/workspace/sources/**": true + }, + "files.watcherExclude": { + "**/.git/**": true, + "**/_build/**": true, + "**/buildhistory/**": true, + "**/cache/**": true, + "**/downloads/**": true, + "**/node_modules/**": true, + "**/oe-logs/**": true, + "**/oe-workdir/**": true, + "**/sstate-cache/**": true, + "**/tmp*/**": true, + "**/workspace/attic/**": true, + "**/workspace/sources/**": true + }, + "python.analysis.exclude": [ + "**/_build/**", + "**/.git/**", + "**/buildhistory/**", + "**/cache/**", + "**/downloads/**", + "**/node_modules/**", + "**/oe-logs/**", + "**/oe-workdir/**", + "**/sstate-cache/**", + "**/tmp*/**", + "**/workspace/attic/**", + "**/workspace/sources/**" + ] +} \ No newline at end of file diff --git a/scripts/oe-setup-builddir b/scripts/oe-setup-builddir index dfd9acbb2cf..10c813788d2 100755 --- a/scripts/oe-setup-builddir +++ b/scripts/oe-setup-builddir @@ -59,6 +59,8 @@ if [ -n "$TEMPLATECONF" ]; then OECORELOCALCONF="$TEMPLATECONF/local.conf.sample" OECOREDESCRCONF="$TEMPLATECONF/conf-description.txt" OECORENOTESCONF="$TEMPLATECONF/conf-notes.txt" + VSCODE_SETTINGS_CONF="$TEMPLATECONF/vscode/settings.json.sample" + VSCODE_EXTENSIONS_CONF="$TEMPLATECONF/vscode/extensions.json" fi unset SHOWYPDOC @@ -114,11 +116,52 @@ if [ ! -r "$BUILDDIR/conf/conf-notes.txt" ]; then [ ! -r "$OECORENOTESCONF" ] || cp "$OECORENOTESCONF" "$BUILDDIR/conf/conf-notes.txt" fi +# If VSCode is installed generate a reasonable configuration +if command -v code > /dev/null; then + # Ensure VSCode does not try to index $BUILDDIR and ends up with an OOM exception. + # Configure also the yocto-bitbake extension to work. + if [ -z "$VSCODE_SETTINGS_CONF" ]; then + VSCODE_SETTINGS_CONF="$OEROOT/meta/conf/templates/default/vscode/settings.json.sample" + fi + if [ ! -r "$OEINIT/.vscode/settings.json" ] && [ -f "$VSCODE_SETTINGS_CONF" ]; then + cat < "$OEINIT/.vscode/settings.json" + SHOWYPDOC=yes + fi + + # Support also recommending extensions for VSCode. + if [ -z "$VSCODE_EXTENSIONS_CONF" ]; then + VSCODE_EXTENSIONS_CONF="$OEROOT/meta/conf/templates/default/vscode/extensions.json" + fi + if [ ! -r "$OEINIT/.vscode/extensions.json" ] && [ -f "$VSCODE_EXTENSIONS_CONF" ]; then + cat < X-Patchwork-Id: 39271 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id B3688C48260 for ; Tue, 13 Feb 2024 22:19:17 +0000 (UTC) Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.41]) by mx.groups.io with SMTP id smtpd.web10.27562.1707862749474413396 for ; Tue, 13 Feb 2024 14:19:09 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Qg36CiqO; spf=pass (domain: gmail.com, ip: 209.85.208.41, mailfrom: adrian.freihofer@gmail.com) Received: by mail-ed1-f41.google.com with SMTP id 4fb4d7f45d1cf-55fe4534e9bso6321519a12.0 for ; Tue, 13 Feb 2024 14:19:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707862748; x=1708467548; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jQq/fgAiBn3MnGnm6WSJQVwUXDARnoqHMVynFyYeALk=; b=Qg36CiqOd8ua4VuWnMlSuSorQhawFYY4P2LFi/uTxxeHtxJYugqtW6GjIdVSxGT6zN UtDIVZ4Jeo2MX03FxQC98cEYeW3T2gfEcjxnaRgxfAIQWZtJFDVwPbvdFk+08spYvcO2 GqSHytI4Vs+W/sywKe1ypFtsDRR9FV+KZH5qeUaV9PYEhSOWV7P6i5eKrDWyHB9XiaA8 mhQFVVa2EWagxXTzA8rpTnXl8tre/i+qJ2KJMGJdBduc920Jca9PcLEgVM/xP+B1Fszt 0klAU1VhAtq1M0wtB91nfq0CubB7eNmj6BzFun6oLwQ694WENlvzYR7Tt8VeBQcdjJz6 DOCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707862748; x=1708467548; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jQq/fgAiBn3MnGnm6WSJQVwUXDARnoqHMVynFyYeALk=; b=Z0JrSZSfcm7LIuMjFcRDcj8nZHtDR+S9VsBWHs5V2NU2zkAsr4lQEcz5+FaHrD2cwP fByFVknSJVZ/yNC30DvXp1jFtd1wjdzCQQuFntQpOT+ePdm3YGIwC5nAN/joot8+BhnO 2yXoQWlFsK4DWT7BhY0ZPGuKsn/OaCMjQk1JaNtHGt844KZVJkems3R9zlRjLEhxuaP0 4wgCGue2WX4I5zoWoIshUefTcTmaN1tQ3VRtelzKsdyVE6BYUGvHuh6x2ZWx24rzWoUs bDeeCM8DUzxq7K+fijkIAb80jmp1Zw4XRYcwRqTwgo9mavPPQVCFB1qzDLsc5yxg/cn1 aEOQ== X-Gm-Message-State: AOJu0YwtfQNtSJP14pdV2EVDmgU+uw2GthcZkO3XCY1pO8VFtCuSKcz7 H1Y0tymzLC3qoeNfk3qiH9yXgiCwvtzJZb+wEgN7vh8Ebrkw0xNzTDdsEE6i X-Google-Smtp-Source: AGHT+IEk0XM+aX84wehr69UXNAd59U3xHL/tGp8fyxVBqXyy/sFCgL9UcNd6D2juLwWWljOG4SGgfg== X-Received: by 2002:aa7:d354:0:b0:55f:e9ce:7406 with SMTP id m20-20020aa7d354000000b0055fe9ce7406mr628497edr.29.1707862747698; Tue, 13 Feb 2024 14:19:07 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id k23-20020a05640212d700b005612987a525sm4027137edx.89.2024.02.13.14.19.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 14:19:07 -0800 (PST) From: Adrian Freihofer X-Google-Original-From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Cc: Adrian Freihofer Subject: [PATCH v2 4/4] oe-init-build-env: generate .vscode/extensions.json Date: Tue, 13 Feb 2024 23:18:08 +0100 Message-ID: <20240213221846.109260-5-adrian.freihofer@siemens.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240213221846.109260-1-adrian.freihofer@siemens.com> References: <20240213221846.109260-1-adrian.freihofer@siemens.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 13 Feb 2024 22:19:17 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/195443 Configure VSCode to ask the user if the yocto-bitbake extension should be installed. --- meta-poky/conf/templates/default/vscode/extensions.json | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 meta-poky/conf/templates/default/vscode/extensions.json diff --git a/meta-poky/conf/templates/default/vscode/extensions.json b/meta-poky/conf/templates/default/vscode/extensions.json new file mode 100644 index 00000000000..6d65ba99c1d --- /dev/null +++ b/meta-poky/conf/templates/default/vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "yocto-project.yocto-bitbake" + ] +}