[pull] staging from yoctoproject:staging#3
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThe changes encompass a variety of configuration files and source code updates, primarily focusing on refining dependency management, event handling, and BitBake integration. New workflows for automated updates have been introduced, while existing functionalities have been streamlined for enhanced performance. Additionally, modifications to versioning and file handling have improved the overall structure and clarity of the codebase. Changes
Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
… for embeddedLanguageDocImportLine
Though this option is marked as deprecated, we can't fully embrach the recommended pull-model for syncing configuration as the logger's logging level can't be synced in the same way like others. It needs to be updated immediately instead of being fetched from the client when needed. More info: https://code.visualstudio.com/api/language-extensions/language-server-extension-guide#explaining-the-language-server
bitBakeNodeAtPoint uses the tree registered in uriToAnalyzedDocument. However, getSymbolsFromBitBakeTree is called before the new tree is registered. Therefore, if bitBakeNodeAtPoint is called whithin getSymbolsFromBitBakeTree, it will give a result from the previous tree. For that reason, it must be avoided.
bitBakeNodeAtPoint uses the tree registered in uriToAnalyzedDocument. However, getSymbolsFromBitBakeTree is called before the new tree is registered. Therefore, if bitBakeNodeAtPoint is called whithin getSymbolsFromBitBakeTree, it will give a result from the previous tree. For that reason, it must be avoided.
This ensures the string is exactly what we expect it to be and anything unwanted presenting before it or after it will result a fail.
bitBakeNodeAtPoint uses the tree registered in uriToAnalyzedDocument. However, getSymbolsFromBitBakeTree is called before the new tree is registered. Therefore, if bitBakeNodeAtPoint is called whithin getSymbolsFromBitBakeTree, it will give a result from the previous tree. For that reason, it must be avoided.
These checks are not necesarry anymore, since the new tree-sitter-bitbake does not detect variable expansions in bash regions anymore.
The script fetch:spdx-licenses is now a mandatory step to build the extension.
We no longer track and update the wasm files in our project, related terms on wasm should be updated.
Bumps [mocha](https://github.com/mochajs/mocha) and [@types/mocha](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mocha). These dependencies needed to be updated together. Updates `mocha` from 10.2.0 to 10.7.0 - [Release notes](https://github.com/mochajs/mocha/releases) - [Changelog](https://github.com/mochajs/mocha/blob/main/CHANGELOG.md) - [Commits](mochajs/mocha@v10.2.0...v10.7.0) Updates `@types/mocha` from 10.0.3 to 10.0.7 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/mocha) --- updated-dependencies: - dependency-name: mocha dependency-type: direct:development update-type: version-update:semver-minor - dependency-name: "@types/mocha" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [@types/vscode](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/vscode) from 1.90.0 to 1.92.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/vscode) --- updated-dependencies: - dependency-name: "@types/vscode" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [@types/vscode](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/vscode) from 1.90.0 to 1.92.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/vscode) --- updated-dependencies: - dependency-name: "@types/vscode" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [vscode-languageserver-textdocument](https://github.com/Microsoft/vscode-languageserver-node/tree/HEAD/textDocument) from 1.0.11 to 1.0.12. - [Release notes](https://github.com/Microsoft/vscode-languageserver-node/releases) - [Commits](https://github.com/Microsoft/vscode-languageserver-node/commits/release/textDocument/1.0.12/textDocument) --- updated-dependencies: - dependency-name: vscode-languageserver-textdocument dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.28.1 to 2.29.1. - [Release notes](https://github.com/import-js/eslint-plugin-import/releases) - [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md) - [Commits](import-js/eslint-plugin-import@v2.28.1...v2.29.1) --- updated-dependencies: - dependency-name: eslint-plugin-import dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Use git ls-remote command to fetch refs or tags instead of cloning the projects first. This script now only takes a few seconds to complete.
The current master branch also outputs the .bb location in the devtool status output. It broke our parsing which could not detect the workspaces. The regex was updated to optionally match the .bb location. But we don't capture it since we always run a complete scan in the end. This could be way for future optimizations.
If the user configures a faulty working directory, the error message was not very clear. This very simple check will show a more clear message early on.
Sanity tests now require a valid working directory to be provided.
Follow the same pattern as for other settings to avoid potential mismatches.
With the updated extensions, some diagnostics linger. They are not harmful, we just need the test to filter out our own expected.
It looks like pylance now sends the diagnostics as pylint, and require to show and save the document before seding them.
Otherwise it would simply remove the line, which may revert to the user's command wrapper if they had one.
The latest vscode version doesn't want to fire the OpenDocument language server event, so we need to deploy full force edits to trigger the diagnostics. It was fine except on headless mode. Also sometimes the diagnostics are sourced as Pylance, sometimes as Pylint, so we use a broader filter. See: microsoft/vscode#138924
Run `npm upgrade` in all packages to bump the minor revisions on all components. Some npm audit warnings are still present so another ncu round will be required.
The workflow already defines the intended Node.js version in the job environment, but actions/setup-node also needs the version passed explicitly. This keeps the VS Code integration job on Node.js 20 after the dependency update.
Pass the parent environment through to the VS Code integration test process so CI-provided variables such as GITHUB_ACTIONS remain available inside the test runner. Allow selecting integration test files with INTEGRATION_TEST_GLOB, so specific suites can be run without deleting compiled test files.
Add a reusable helper for waiting on VS Code diagnostics during integration tests. On timeout, include a bounded diagnostics snapshot so headless CI failures are easier to inspect without keeping the unrelated Pylance warm-up experiments.
These suites depend on real Pylance diagnostics emitted from embedded Python documents. Pylance still does not emit those diagnostics deterministically in the headless GitHub Actions VS Code profile, so keep the suites available locally but skip them in CI.
Add a synthetic integration test that publishes a Pylance diagnostic on the generated embedded Python document and verifies that it is remapped back to the BitBake document. This keeps automated coverage for the bitbake-python remapping path while the real Pylance-dependent suites remain skipped in CI.
Use the diagnostics wait helper in the real Pylance-dependent integration suites. These suites remain skipped in CI, but when they are run locally or during future debugging, timeout failures now include the diagnostics snapshot added by the helper.
Toaster is started through the bitbake environment with 'source toaster', which is not expected to be available in eSDK mode. Disable the Toaster commands and hide the main BitBake menu entry when the eSDK mode context is active.
| runs-on: self-hosted | ||
|
|
||
| defaults: | ||
| run: | ||
| shell: bash | ||
|
|
||
| env: | ||
| DBUS_SESSION_BUS_ADDRESS: unix:path=/run/user/1001/bus | ||
| DBUS_SESSION_BUS_ADDRESS: unix:path=/run/user/13010/bus | ||
| SHELL: /usr/bin/bash | ||
|
|
||
| strategy: | ||
| matrix: | ||
| node-version: [20] | ||
| node-version: 20 | ||
|
|
||
| steps: | ||
| - name: Checkout Repository | ||
| uses: actions/checkout@v2 | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v3 | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
|
|
||
| - name: Clean install | ||
| run: npm run clean | ||
| node-version: '20.x' | ||
| cache: 'npm' | ||
| cache-dependency-path: | | ||
| package-lock.json | ||
| server/package-lock.json | ||
| client/package-lock.json | ||
|
|
||
| - name: Install Node.js dependencies | ||
| run: npm install | ||
|
|
||
| # Inspired by https://stackoverflow.com/a/72981982 | ||
| - name: Configure Git autor for Yocto do_patch | ||
| run: | | ||
| git config --global user.name "${GITHUB_ACTOR}" | ||
| git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" | ||
|
|
||
| - name: Cache fetch | ||
| id: cache-fetch | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: | | ||
| server/resources/docs | ||
| server/resources/spdx-licenses.json | ||
| resources/poky | ||
| key: cache-${{ hashFiles('scripts/fetch-poky.sh', 'scripts/fetch-docs.sh', 'scripts/fetch-spdx-licenses.sh') }} | ||
|
|
||
| - name: Fetch | ||
| if: steps.cache-fetch.outputs.cache-hit != 'true' | ||
| run: npm run fetch:poky && npm run fetch:docs && npm run fetch:spdx-licenses | ||
|
|
||
| - name: Cache build Wasm files | ||
| id: cache-wasm | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: | | ||
| server/tree-sitter-bash.wasm | ||
| server/tree-sitter-bitbake.wasm | ||
| key: cache-${{ hashFiles('server/tree-sitter-bash.info', 'server/tree-sitter-bitbake.info') }} | ||
|
|
||
| - name: Install Dependencies | ||
| run: npm install && npm run fetch && sudo apt install chrpath diffstat | ||
| - name: Fetch Wasm files | ||
| if: steps.cache-wasm.outputs.cache-hit != 'true' | ||
| run: npm run fetch:wasm | ||
|
|
||
| - name: Run Linter | ||
| run: npm run lint | ||
|
|
||
| - name: Build Project | ||
| run: npm run compile | ||
|
|
||
| - name: Cache VSCode installation | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: | | ||
| .vscode-test/vscode-* | ||
| .vscode-test/extensions | ||
| key: cache-${{ hashFiles('integration-tests/src/runTest.ts') }} | ||
|
|
||
| - name: Test Project | ||
| run: npm run test | ||
| env: | ||
| # NFS Yocto cache directories on the self-hosted runner | ||
| DL_DIR: /var/cache/yocto/yocto-dldir | ||
| SSTATE_DIR: /var/cache/yocto/yocto-sstate | ||
| BB_ENV_PASSTHROUGH_ADDITIONS: "DL_DIR SSTATE_DIR" | ||
|
|
||
| - name: Build the VSIX | ||
| run: npm run package | ||
|
|
||
| - name: Archive VSIX | ||
| uses: actions/upload-artifact@v3 | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: vscode-bitbake | ||
| path: client/yocto-bitbake*.vsix | ||
| path: ./yocto-bitbake*.vsix | ||
|
|
||
| - name: Cleanup | ||
| if: success() | ||
| run: npm run clean | ||
|
|
||
| # Inspired by https://github.com/microsoft/vscode-platform-specific-sample/blob/a0192a21122dfa5c90934b006f027cdf4e4d892d/.github/workflows/ci.yml#L64C11-L64C11 MIT License | ||
| publish: | ||
| publish-vsce: |
This fixes a specific kas-container quirk. When you run kas-container
on a kas file in a repository that also contains bitbake layers it will
mount the working directory twice. Once under /work and once under /repo.
The resulting bblayers.conf will looks like this:
BBLAYERS ?= " \
${TOPDIR}/../remote-layer \
${TOPDIR}/../../repo/your-local-layer \
"
${TOPDIR} is /work/build in this context.
For the path /work/build/../../repo/your-local-layer we need to change
the containerMountPoint from /work to /repo to resolve paths correctly.
Signed-off-by: Alexander Sowarka <alexander.sowarka@linaro.org>
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )