mbox series

[v2,0/4] vscode: improve settings for new yocto plugin

Message ID 20240213221846.109260-1-adrian.freihofer@siemens.com
Headers show
Series vscode: improve settings for new yocto plugin | expand

Message

Adrian Freihofer Feb. 13, 2024, 10:18 p.m. UTC
Changes in comparison to v1:
Remove the settings.json from Git and generate it with templates,
similar to how the local.conf file is generated.

With these patches, VSCode and the new plugin from
https://marketplace.visualstudio.com/items?itemName=yocto-project.yocto-bitbake
should work without any manual configuration once the oe-init-build-env
script has been sourced. VSCode is also configured to not index the
build folder and finally crash with an OOM exception.

Without these patches, the issue is that the 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.

Just removing the settings.json from git would lead to other issues as
already described in the commit message of 5ff688fe29. and the plugin
needs manual configuration.

Discussion is here:
https://github.com/yoctoproject/vscode-bitbake/issues/95

Adrian Freihofer (4):
  vscode: drop .vscode folder
  oe-init-build-env: add OEINIT variable
  oe-init-build-env: generate .vscode from template
  oe-init-build-env: generate .vscode/extensions.json

 .gitignore                                    |  3 +-
 .vscode/settings.json                         | 32 -------------
 .../templates/default/vscode/extensions.json  |  5 ++
 .../default/vscode/settings.json.sample       | 47 +++++++++++++++++++
 oe-init-build-env                             |  6 +++
 scripts/oe-setup-builddir                     | 46 +++++++++++++++++-
 6 files changed, 104 insertions(+), 35 deletions(-)
 delete mode 100644 .vscode/settings.json
 create mode 100644 meta-poky/conf/templates/default/vscode/extensions.json
 create mode 100644 meta-poky/conf/templates/default/vscode/settings.json.sample