mbox series

[v3,0/2] oe-init-build-env: generate .vscode from template

Message ID 20240214173914.136799-1-adrian.freihofer@siemens.com
Headers show
Series oe-init-build-env: generate .vscode from template | expand

Message

Adrian Freihofer Feb. 14, 2024, 5:36 p.m. UTC
Changes in comparison to v2:
- Do not integrate with the oe-setup-build or templating infrastructuure.
  Provide a minimalistic script which is just good enough to generate a
  configuration which fits for poky.
- Some details will be fixed on the plugin side which allows to simplify
  the generated bitbake plugin configuration to a minimum.

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 (2):
  vscode: drop .vscode folder
  oe-init-build-env: generate .vscode from template

 .gitignore              |  3 +-
 .vscode/settings.json   | 32 ---------------
 oe-init-build-env       |  6 +++
 scripts/oe-setup-vscode | 90 +++++++++++++++++++++++++++++++++++++++++
 4 files changed, 97 insertions(+), 34 deletions(-)
 delete mode 100644 .vscode/settings.json
 create mode 100755 scripts/oe-setup-vscode