yoctoproject / vscode-bitbake

Bitbake language support for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=yocto-project.yocto-bitbake
Other
41 stars 10 forks source link

Chore: Update tree-sitter-bitbake #280

Closed idillon-sfl closed 1 month ago

idillon-sfl commented 1 month ago

This fixes nested variable expansions in shell regions

cmake_runcmake_build() {
    bbnote ${DESTDIR:+DESTDIR=${DESTDIR} }${CMAKE_VERBOSE} cmake --build '${B}' "$@" -- ${EXTRA_OECMAKE_BUILD}
    eval ${DESTDIR:+DESTDIR=${DESTDIR} }${CMAKE_VERBOSE} cmake --build '${B}' "$@" -- ${EXTRA_OECMAKE_BUILD}
}

Here's a test I added: https://github.com/idillon-sfl/tree-sitter-bitbake/blob/821169a172bfe3c7125927ca151e299a1f43759b/test/corpus/shell.txt#L45

Note the new version of tree-sitter-bitbake does not handle shell variable expansions anymore. It was a lot of trouble, and we now use tree-sitter-bash instead for those.