[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 |
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.
With the fetch script refactoring, we had a regression in the node package of the CI wich missed these resources.
There was a problem hiding this comment.
Actionable comments posted: 17
Outside diff range, codebase verification and nitpick comments (32)
server/src/__tests__/fixtures/semanticTokens.bb (2)
Line range hint
11-17: Consider separating Python code from BitBake recipe.The Python code seems unrelated to the BitBake recipe and might be better placed in a separate Python file.
Consider moving the Python code to a dedicated Python script file to maintain separation of concerns and improve readability.
6-7: Functiondo_stuffis defined elsewhere but not sourced in the current file.The
do_stufffunction is defined inintegration-tests/project-folder/sources/meta-fixtures/rename.bb, but there is no indication that this definition is accessible inserver/src/__tests__/fixtures/semanticTokens.bb, where it is used. Ensure that the file usingdo_stuffcorrectly sources or imports the definition.
- Definition found:
integration-tests/project-folder/sources/meta-fixtures/rename.bbAnalysis chain
Verify the existence and implementation of
do_stuff.Ensure that the
do_stufffunction is defined and correctly implemented.Run the following script to verify the function definition:
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the definition of the `do_stuff` function. # Test: Search for the function definition in the repository. rg --type shell 'do_stuff'Length of output: 56
Script:
#!/bin/bash # Description: Verify the definition of the `do_stuff` function. # Test: Search for the function definition in the repository without specifying a file type. rg 'do_stuff()' -A 3Length of output: 576
.github/workflows/main.yml (1)
26-26: Consider specifying Node.js version as a string.The
node-versionshould be specified as a string to avoid potential issues with YAML parsing.node-version: '20'TROUBLESHOOTING.md (5)
19-22: Improve clarity and conciseness.Consider rephrasing for clarity and conciseness:
- When the extension is activated, `files.trimTrailingWhiteSpace` is deactivated for Python and Shell documents because this option interferes with the handling of Python and Shell code in BitBake documents. + When the extension is activated, `files.trimTrailingWhiteSpace` is turned off for Python and Shell documents to prevent interference with BitBake code handling.- In the background, some Python and Shell documents are made in order to handle Python and Shell languages in BitBake files. These documents contain a lot of trailing whitespaces. If `files.trimTrailingWhiteSpace` is activated, it will trim the whitespaces into these files, making it hard to map the positions between the generated files and the original BitBake file. + Background Python and Shell documents are created to handle these languages in BitBake files, containing many trailing whitespaces. Activating `files.trimTrailingWhiteSpace` trims these whitespaces, complicating position mapping between generated and original BitBake files.Tools
LanguageTool
[style] ~22-~22: Consider a shorter alternative to avoid wordiness.
Context: ...ome Python and Shell documents are made in order to handle Python and Shell languages in Bi...(IN_ORDER_TO_PREMIUM)
[style] ~22-~22: To elevate your writing, try using a synonym here.
Context: ...whitespaces into these files, making it hard to map the positions between the genera...(HARD_TO)
60-64: Enhance conciseness.Consider rephrasing for conciseness:
- Prior to poky Scarthgap, a random bug may occur when parsing Yocto recipes through our BitBake commands, or saving a file (Ctrl+S). This is due to VSCode sometimes saving files in the background while the parsing is taking place in combination to a problematic handling of the progressbar in poky. + Before poky Scarthgap, a bug may occur when parsing Yocto recipes or saving a file (Ctrl+S) due to VSCode's background file saving and poky's progressbar handling issues.Tools
LanguageTool
[uncategorized] ~60-~60: Possible missing comma found.
Context: ...n ### Parsing terminal reports an error but the parsing was successful Prior to po...(AI_HYDRA_LEO_MISSING_COMMA)
[style] ~61-~61: ‘Prior to’ might be wordy. Consider a shorter alternative.
Context: ...n error but the parsing was successful Prior to poky Scarthgap, a random bug may occur ...(EN_WORDINESS_PREMIUM_PRIOR_TO)
71-72: Ensure word coherence.Consider using consistent terminology:
- Settings for Flake8 and Pylint do not work on BitBake files. In other words, they are not configurable. The reason for this issue is currently unknown. + Settings for Flake8 and Pylint do not apply to BitBake files, meaning they are not configurable. The reason for this issue is currently unknown.
83-84: Enhance conciseness.Consider rephrasing for conciseness:
- Since Flake8 and Pylint are intended to be used on Python files, it is necessary to analyse the context in which the errors are generated to determine if they still apply to the BitBake file. Unfortunately, some errors require complex analysis and our experiments showed performance issues. For this reason, these errors are currently being completely ignored. + Flake8 and Pylint are designed for Python files, requiring context analysis to determine error applicability to BitBake files. Some errors need complex analysis, causing performance issues, so they are currently ignored.Tools
LanguageTool
[uncategorized] ~84-~84: Do not mix variants of the same word (‘analyse’ and ‘analyze’) within a single text.
Context: ...sed on Python files, it is necessary to analyse the context in which the errors are gen...(EN_WORD_COHERENCY)
[style] ~84-~84: Using two adverbs in a row like this may make your sentence unnecessarily wordy. For clarity and conciseness, see if you can omit one of them.
Context: ...sues. For this reason, these errors are currently being completely ignored. The linting errors being comp...(LY_LY)
69-69: Fix unordered list indentation.Ensure consistent indentation for unordered lists:
- https://git.yoctoproject.org/poky/commit/?id=fff242b5d21f9d856557ed9367fa43fa8b435be5Tools
Markdownlint
69-69: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
69-69: null
Bare URL used(MD034, no-bare-urls)
integration-tests/src/tests/rename.test.ts (2)
16-24: Enhance error message clarity.Consider providing a more descriptive error message for clarity:
- assert.fail('Bitbake extension is not available') + assert.fail('The Bitbake extension is not available. Please ensure it is installed and enabled.')
31-56: Use optional chaining for safety.Consider using optional chaining to avoid potential runtime errors:
- return result.entries().every(([uri, edits], index) => { + return result?.entries().every(([uri, edits], index) => {README-DEVELOPER.md (6)
34-34: Correct the repeated word "to".There's a repeated word in the debug instructions.
Apply this diff to correct the typo:
Press `F5` or navigate to the debug section on the left of the VS Code and select the client or server to to launch the debug client. -Press `F5` or navigate to the debug section on the left of the VS Code and select the client or server to to launch the debug client. +Press `F5` or navigate to the debug section on the left of the VS Code and select the client or server to launch the debug client.Tools
LanguageTool
[duplication] ~34-~34: Possible typo: you repeated a word
Context: ...VS Code and select the client or server to to launch the debug client. ### Install 1...(ENGLISH_WORD_REPEAT_RULE)
57-61: Fix step numbering in testing instructions.The numbering of steps is incorrect. The second step is repeated.
Apply this diff to correct the numbering:
2. Fetch Poky (required for the integration tests): 3. Run all the tests:
98-98: Consider rephrasing to avoid wordiness.The phrase "in order to" can be simplified.
Apply this diff to simplify the sentence:
After updating the .info files, it is required to call `npm run fetch:wasm` in order to rebuild the Wasm files. -After updating the .info files, it is required to call `npm run fetch:wasm` in order to rebuild the Wasm files. +After updating the .info files, call `npm run fetch:wasm` to rebuild the Wasm files.Tools
LanguageTool
[style] ~98-~98: Consider a shorter alternative to avoid wordiness.
Context: ...s required to callnpm run fetch:wasmin order to rebuild the Wasm files. For more infor...(IN_ORDER_TO_PREMIUM)
105-111: Fix list indentation for consistency.The list items are not properly indented.
Apply this diff to correct the indentation:
- - Update all the `package.json` files with the new version number `X.Y.Z`. - - Document new changes in the `client/CHANGELOG.md` file. - - Make sure the `VSCE_PAT` secret is valid in the [GitHub repository settings](https://github.com/yoctoproject/vscode-bitbake/settings/secrets/actions). - - Make sure the `NODE_AUTH_TOKEN` secret is valid in the [GitHub repository settings](https://github.com/yoctoproject/vscode-bitbake/settings/secrets/actions). - - Update the main branch with the latest staging branch. - - Create a [new release on GitHub](https://github.com/yoctoproject/vscode-bitbake/releases/new) with a tag in the format `vX.Y.Z`. - - Admin approval is required to run the GitHub Action. + - Update all the `package.json` files with the new version number `X.Y.Z`. + - Document new changes in the `client/CHANGELOG.md` file. + - Make sure the `VSCE_PAT` secret is valid in the [GitHub repository settings](https://github.com/yoctoproject/vscode-bitbake/settings/secrets/actions). + - Make sure the `NODE_AUTH_TOKEN` secret is valid in the [GitHub repository settings](https://github.com/yoctoproject/vscode-bitbake/settings/secrets/actions). + - Update the main branch with the latest staging branch. + - Create a [new release on GitHub](https://github.com/yoctoproject/vscode-bitbake/releases/new) with a tag in the format `vX.Y.Z`. + - Admin approval is required to run the GitHub Action.Tools
Markdownlint
105-105: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
106-106: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
107-107: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
108-108: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
109-109: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
110-110: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
111-111: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
114-119: Consider using reference-style links for bare URLs.Bare URLs are used in the publishing section.
Consider using reference-style links for better readability.
Tools
Markdownlint
114-114: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
115-115: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
117-117: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
119-119: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
114-114: null
Bare URL used(MD034, no-bare-urls)
115-115: null
Bare URL used(MD034, no-bare-urls)
117-117: null
Bare URL used(MD034, no-bare-urls)
119-119: null
Bare URL used(MD034, no-bare-urls)
128-128: Use dash for unordered list style.The list item uses an asterisk instead of a dash.
Apply this diff to correct the list style:
-* Syntax derived from https://github.com/mholo65/vscode-bitbake, which is licensed under the [MIT License](https://github.com/mholo65/vscode-bitbake/blob/master/LICENSE). +- Syntax derived from https://github.com/mholo65/vscode-bitbake, which is licensed under the [MIT License](https://github.com/mholo65/vscode-bitbake/blob/master/LICENSE).Tools
Markdownlint
128-128: Expected: dash; Actual: asterisk
Unordered list style(MD004, ul-style)
128-128: null
Bare URL used(MD034, no-bare-urls)
CHANGELOG.md (6)
1-1: Use an en dash for date ranges.Consider using an en dash for numerical ranges or time ranges to enhance readability.
Apply this diff to fix the issue:
-# 2.6.0 - 2024.06.19 +# 2.6.0 – 2024.06.19Tools
LanguageTool
[typographical] ~1-~1: If you want to indicate numerical ranges or time ranges, consider using an en dash.
Context: # 2.6.0 - 2024.06.19 - Support renaming of BitBa...(DASH_RULE)
3-12: Fix unordered list indentation.The indentation for the unordered list is inconsistent. Adjust the indentation to improve readability.
Apply this diff to fix the indentation:
- - Support renaming of BitBake variables in Python and Shell functions - - Detect BitBake variables in Shell functions - - Use require/inherit context in Python and Shell functions - - Improve Shell syntax highlighting of BitBake variables and functions - - Add SPDX licenses suggestions & hovers - - Support Pylint and Flake8 extensions' diagnostics - - Bump all dependencies - - Setup automated dependency updates - - Setup CI caching - - Minor bug fixes + - Support renaming of BitBake variables in Python and Shell functions + - Detect BitBake variables in Shell functions + - Use require/inherit context in Python and Shell functions + - Improve Shell syntax highlighting of BitBake variables and functions + - Add SPDX licenses suggestions & hovers + - Support Pylint and Flake8 extensions' diagnostics + - Bump all dependencies + - Setup automated dependency updates + - Setup CI caching + - Minor bug fixesTools
Markdownlint
3-3: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
4-4: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
5-5: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
6-6: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
7-7: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
8-8: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
9-9: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
10-10: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
11-11: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
12-12: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
14-14: Use an en dash for date ranges.Consider using an en dash for numerical ranges or time ranges to enhance readability.
Apply this diff to fix the issue:
-# 2.5.0 - 2024.05.28 +# 2.5.0 – 2024.05.28Tools
LanguageTool
[typographical] ~14-~14: If you want to indicate numerical ranges or time ranges, consider using an en dash.
Context: ...p CI caching - Minor bug fixes # 2.5.0 - 2024.05.28 - Add Yocto variables renam...(DASH_RULE)
18-18: Add a period after "etc."In American English, abbreviations like "etc." require a period.
Apply this diff to fix the issue:
- - Add code suggestions for recipe names in variables (DEPENDS, RDEPENDS, etc) + - Add code suggestions for recipe names in variables (DEPENDS, RDEPENDS, etc.)Tools
LanguageTool
[style] ~18-~18: In American English, abbreviations like “etc.” require a period.
Context: ... names in variables (DEPENDS, RDEPENDS, etc) - Add an option to prevent modificati...(ETC_PERIOD)
Markdownlint
18-18: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
26-26: Use an en dash for date ranges.Consider using an en dash for numerical ranges or time ranges to enhance readability.
Apply this diff to fix the issue:
-# 2.4.0 - 2024.03.08 +# 2.4.0 – 2024.03.08Tools
LanguageTool
[typographical] ~26-~26: If you want to indicate numerical ranges or time ranges, consider using an en dash.
Context: ... remove deprecated dependencies # 2.4.0 - 2024.03.08 - Publish on open-vsx/Codiu...(DASH_RULE)
28-28: Hyphenate compound adjectives.If this is a compound adjective that modifies the following noun, use a hyphen.
Apply this diff to fix the issue:
- - Publish on open-vsx/Codium open source alternative + - Publish on open-vsx/Codium open-source alternativeTools
LanguageTool
[uncategorized] ~28-~28: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...24.03.08 - Publish on open-vsx/Codium open source alternative - Add commands to start an...(EN_COMPOUND_ADJECTIVE_INTERNAL)
Markdownlint
28-28: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
client/src/driver/BitbakeDriver.ts (1)
67-76: Ensure disposal ofprocessToStopevent listenerThe
onExitevent listener forprocessToStopis not disposed of, which may lead to a memory leak. Consider adding it to thedisposablesarray or ensuring it is properly managed.
processToStop.onExitlistener is not disposed of.Analysis chain
Ensure proper disposal of event listeners.
Ensure that all event listeners are properly disposed of to prevent memory leaks.
Run the following script to verify that all event listeners are properly disposed of:
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that all event listeners are properly disposed of. # Test: Search for event listeners in the BitbakeDriver class. Expect: All listeners are disposed of. rg --type typescript -A 5 'onData|onExit' client/src/driver/BitbakeDriver.tsLength of output: 113
Script:
#!/bin/bash # Description: Verify that all event listeners are properly disposed of. # Test: Search for event listeners in the BitbakeDriver class. Expect: All listeners are disposed of. rg -A 5 'onData|onExit' client/src/driver/BitbakeDriver.tsLength of output: 742
client/src/language/diagnosticsSupport.ts (1)
138-141: Consider using optional chaining.The static analysis tool suggests using optional chaining for better readability and safety.
Apply this diff to use optional chaining:
return supportedSources.some( - (supportedSource) => diagnostic.source !== undefined && diagnostic.source.includes(supportedSource) + (supportedSource) => diagnostic.source?.includes(supportedSource) )Tools
Biome
[error] 140-140: Change to an optional chain.
Unsafe fix: Change to an optional chain.
(lint/complexity/useOptionalChain)
README.md (7)
5-7: Consider rephrasing for clarity.The phrase "lots of" might be wordy. Consider using "a large amount of" or "many".
Apply this change for clarity:
- be hogging lots of resources + be consuming a large amount of resources
9-15: Add missing commas.There are missing commas in the sentences.
Apply this diff to add the missing commas:
- Here's an example `settings.json` reflecting some default values to run bitbake on your host machine: + Here's an example `settings.json`, reflecting some default values to run bitbake on your host machine:
29-29: Add missing comma.There is a missing comma in the sentence.
Apply this diff to add the missing comma:
- by using the `bitbake.workingDirectory` option as well as the shell environment variables with `bitbake.shellEnv`. + by using the `bitbake.workingDirectory` option, as well as the shell environment variables with `bitbake.shellEnv`.Tools
LanguageTool
[uncategorized] ~29-~29: Possible missing comma found.
Context: ...by using thebitbake.workingDirectoryoption as well as the shell environment variab...(AI_HYDRA_LEO_MISSING_COMMA)
136-136: Add hyphen for compound adjective.The phrase "go to" should be hyphenated as "go-to" when used as a compound adjective.
Apply this diff to add the hyphen:
- The go to definition feature currently behaves as follows: + The go-to definition feature currently behaves as follows:Tools
LanguageTool
[grammar] ~136-~136: It appears that a hyphen is missing (“go-to” is a compound adjective).
Context: ...a list of definitions is provided. The go to definition feature currently behaves as...(GO_TO_HYPHEN)
161-161: Rephrase for grammatical correctness.The phrase "allow to build" should be rephrased for grammatical correctness.
Apply this diff to rephrase the sentence:
- They allow to build or a run any specific BitBake command on a set of recipes. + They allow you to build or run any specific BitBake command on a set of recipes.Tools
LanguageTool
[grammar] ~161-~161: Did you mean “building”? Or maybe you should add a pronoun? In active voice, ‘allow’ + ‘to’ takes an object, usually a pronoun.
Context: ...rough thetasks.jsonfile. They allow to build or a run any specific BitBake command o...(ALLOW_TO)
[grammar] ~161-~161: Did you mean “having”? Or maybe you should add a pronoun? In active voice, ‘require’ + ‘to’ takes an object, usually a pronoun.
Context: ...a set of recipes. This feature requires to have properly [configured the extension](#se...(ALLOW_TO)
Markdownlint
161-161: null
Link fragments should be valid(MD051, link-fragments)
205-205: Add missing comma.There is a missing comma in the sentence.
Apply this diff to add the missing comma:
- in the recipe tree view, or in the editor's contextual menu and run the command `Bitbake: Devtool: Modify recipe`. + in the recipe tree view, or in the editor's contextual menu, and run the command `Bitbake: Devtool: Modify recipe`.Tools
LanguageTool
[uncategorized] ~205-~205: Possible missing comma found.
Context: ...ree view, or in the editor's contextual menu and run the command `Bitbake: Devtool: ...(AI_HYDRA_LEO_MISSING_COMMA)
242-242: Remove repeated word.The word "Toaster" is repeated unnecessarily.
Apply this diff to remove the repeated word:
- ### Toaster Toaster users may start toaster through the **main context menu** -> **Bitbake** -> **Start toaster in browser**. + ### Toaster users may start toaster through the **main context menu** -> **Bitbake** -> **Start toaster in browser**.Tools
LanguageTool
[duplication] ~242-~242: Possible typo: you repeated a word
Context: ...s in the command output) on hover. ### Toaster Toaster users may start toaster through the **m...(ENGLISH_WORD_REPEAT_RULE)
server/src/tree-sitter/analyzer.ts (1)
190-193: Consider adding a TODO comment for future diagnostic logic.The method currently returns an empty diagnostics array, indicating a placeholder for future work.
const diagnostics: Diagnostic[] = [] + // TODO: Implement diagnostic logic
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (19)
client/doc/overrides.gifis excluded by!**/*.gifclient/doc/variable-flags.gifis excluded by!**/*.gifclient/doc/yocto-tasks.gifis excluded by!**/*.gifclient/package-lock.jsonis excluded by!**/package-lock.jsonimages/bitbake-terminal-profile.pngis excluded by!**/*.pngimages/config-picker.pngis excluded by!**/*.pngimages/contextual-menu.pngis excluded by!**/*.pngimages/devtool.pngis excluded by!**/*.pngimages/directive-statements.gifis excluded by!**/*.gifimages/go-to-definition.gifis excluded by!**/*.gifimages/highlighting.pngis excluded by!**/*.pngimages/hover-information.gifis excluded by!**/*.gifimages/other-suggestions.gifis excluded by!**/*.gifimages/problems.pngis excluded by!**/*.pngimages/recipe-view.pngis excluded by!**/*.pngimages/status-bar.gifis excluded by!**/*.gifpackage-lock.jsonis excluded by!**/package-lock.jsonserver/package-lock.jsonis excluded by!**/package-lock.jsonserver/tree-sitter-bitbake.wasmis excluded by!**/*.wasm
Files selected for processing (100)
- .github/dependabot.yml (1 hunks)
- .github/workflows/main.yml (3 hunks)
- .github/workflows/update-ref.yml (3 hunks)
- .github/workflows/update-tree-sitter-parser-info-file.yml (1 hunks)
- .gitignore (1 hunks)
- .vscode/launch.json (5 hunks)
- .vscodeignore (1 hunks)
- CHANGELOG.md (1 hunks)
- LICENSE (2 hunks)
- README-DEVELOPER.md (1 hunks)
- README.md (1 hunks)
- TROUBLESHOOTING.md (3 hunks)
- client/package.json (2 hunks)
- client/src/tests/unit-tests/driver/eSDKMode.test.ts (1 hunks)
- client/src/tests/unit-tests/driver/scanner.test.ts (4 hunks)
- client/src/tests/unit-tests/ui/bitbake-recipes-view.test.ts (1 hunks)
- client/src/tests/unit-tests/ui/devtool-workspaces-view.test.ts (1 hunks)
- client/src/tests/utils/bitbake.ts (1 hunks)
- client/src/documentLinkProvider.ts (2 hunks)
- client/src/driver/BitBakeProjectScanner.ts (8 hunks)
- client/src/driver/BitbakeDriver.ts (2 hunks)
- client/src/driver/BitbakeRecipeScanner.ts (3 hunks)
- client/src/extension.ts (6 hunks)
- client/src/language/RequestManager.ts (2 hunks)
- client/src/language/diagnosticsSupport.ts (3 hunks)
- client/src/language/languageClient.ts (6 hunks)
- client/src/language/middlewareDefinition.ts (3 hunks)
- client/src/language/middlewareReferences.ts (3 hunks)
- client/src/language/middlewareRename.ts (1 hunks)
- client/src/lib/package.json (1 hunks)
- client/src/lib/src/types/notifications.ts (1 hunks)
- client/src/lib/src/types/requests.ts (1 hunks)
- client/src/ui/BitbakeCommands.ts (5 hunks)
- client/src/ui/BitbakeRecipesView.ts (3 hunks)
- client/src/ui/BitbakeStatusBar.ts (3 hunks)
- client/src/ui/BitbakeTerminal.ts (2 hunks)
- client/src/ui/BitbakeWorkspace.ts (3 hunks)
- client/src/ui/DevtoolWorkspacesView.ts (2 hunks)
- integration-tests/project-folder/.vscode/settings.json (1 hunks)
- integration-tests/project-folder/sources/meta-error/conf/layer.conf (1 hunks)
- integration-tests/project-folder/sources/meta-fixtures-versions/conf/layer.conf (1 hunks)
- integration-tests/project-folder/sources/meta-fixtures-versions/recipes-fixtures/fixture-version/fixture-version_0.1.0.bb (1 hunks)
- integration-tests/project-folder/sources/meta-fixtures-versions/recipes-fixtures/fixture-version/fixture-version_0.2.0.bb (1 hunks)
- integration-tests/project-folder/sources/meta-fixtures-versions/recipes-fixtures/fixture-version/fixture-version_0.3.0.bb (1 hunks)
- integration-tests/project-folder/sources/meta-fixtures/references.bb (1 hunks)
- integration-tests/project-folder/sources/meta-fixtures/rename.bb (1 hunks)
- integration-tests/src/runTest.ts (2 hunks)
- integration-tests/src/tests/bitbake-commands.test.ts (2 hunks)
- integration-tests/src/tests/bitbake-parse.test.ts (1 hunks)
- integration-tests/src/tests/references.test.ts (1 hunks)
- integration-tests/src/tests/rename.test.ts (1 hunks)
- integration-tests/src/utils/bitbake.ts (2 hunks)
- integration-tests/src/utils/version.ts (1 hunks)
- jest.config.js (1 hunks)
- package.json (3 hunks)
- scripts/build-tree-sitter-wasm.sh (1 hunks)
- scripts/fetch-docs.sh (1 hunks)
- scripts/fetch-poky.sh (2 hunks)
- scripts/fetch-spdx-licenses.sh (1 hunks)
- scripts/update-ref.sh (1 hunks)
- scripts/update-tree-sitter-bash.sh (1 hunks)
- scripts/update-tree-sitter-bitbake.sh (1 hunks)
- scripts/update-tree-sitter.sh (1 hunks)
- server/.npmignore (1 hunks)
- server/README.md (1 hunks)
- server/package.json (2 hunks)
- server/src/BitBakeDocScanner.ts (2 hunks)
- server/src/BitbakeProjectScannerClient.ts (2 hunks)
- server/src/tests/analyzer.test.ts (4 hunks)
- server/src/tests/completions.test.ts (37 hunks)
- server/src/tests/definition.test.ts (2 hunks)
- server/src/tests/embedded-languages.test.ts (5 hunks)
- server/src/tests/fixtures/completion.bb (1 hunks)
- server/src/tests/fixtures/fixtures.ts (1 hunks)
- server/src/tests/fixtures/hover.bb (1 hunks)
- server/src/tests/fixtures/rename.bb (1 hunks)
- server/src/tests/fixtures/semanticTokens.bb (1 hunks)
- server/src/tests/hover.test.ts (9 hunks)
- server/src/tests/onReference.test.ts (1 hunks)
- server/src/tests/onRename.test.ts (1 hunks)
- server/src/tests/semanticTokens.test.ts (5 hunks)
- server/src/completions/completion-item-data.d.ts (1 hunks)
- server/src/completions/spdx-licenses.ts (1 hunks)
- server/src/connectionHandlers/onCompletion.ts (11 hunks)
- server/src/connectionHandlers/onHover.ts (4 hunks)
- server/src/connectionHandlers/onReference.ts (2 hunks)
- server/src/connectionHandlers/onRename.ts (1 hunks)
- server/src/embedded-languages/bash-support.ts (3 hunks)
- server/src/embedded-languages/general-support.ts (1 hunks)
- server/src/embedded-languages/python-support.ts (3 hunks)
- server/src/semanticTokens.ts (2 hunks)
- server/src/server.ts (4 hunks)
- server/src/tree-sitter/analyzer.ts (29 hunks)
- server/src/tree-sitter/declarations.ts (2 hunks)
- server/src/tree-sitter/parser.ts (1 hunks)
- server/src/utils/spdx-licenses.ts (1 hunks)
- server/src/utils/textDocument.ts (1 hunks)
- server/tree-sitter-bash.info (1 hunks)
- server/tree-sitter-bitbake.info (1 hunks)
- server/tsconfig.json (1 hunks)
Files skipped from review due to trivial changes (15)
- .github/dependabot.yml
- .gitignore
- .vscodeignore
- LICENSE
- client/src/lib/package.json
- client/src/ui/BitbakeTerminal.ts
- integration-tests/project-folder/sources/meta-fixtures-versions/recipes-fixtures/fixture-version/fixture-version_0.2.0.bb
- jest.config.js
- scripts/fetch-docs.sh
- scripts/fetch-poky.sh
- scripts/update-tree-sitter-bitbake.sh
- server/README.md
- server/src/completions/completion-item-data.d.ts
- server/tree-sitter-bash.info
- server/tree-sitter-bitbake.info
Additional context used
actionlint
.github/workflows/main.yml
114-114: shellcheck reported issue in this script: SC2046:warning:1:32: Quote this to prevent word splitting
(shellcheck)
114-114: shellcheck reported issue in this script: SC2061:warning:1:48: Quote the parameter to -iname so the shell won't interpret it
(shellcheck)
126-126: shellcheck reported issue in this script: SC2046:warning:1:18: Quote this to prevent word splitting
(shellcheck)
126-126: shellcheck reported issue in this script: SC2061:warning:1:34: Quote the parameter to -iname so the shell won't interpret it
(shellcheck)
126-126: shellcheck reported issue in this script: SC2086:info:1:58: Double quote to prevent globbing and word splitting
(shellcheck)
LanguageTool
TROUBLESHOOTING.md
[style] ~22-~22: Consider a shorter alternative to avoid wordiness.
Context: ...ome Python and Shell documents are made in order to handle Python and Shell languages in Bi...(IN_ORDER_TO_PREMIUM)
[style] ~22-~22: To elevate your writing, try using a synonym here.
Context: ...whitespaces into these files, making it hard to map the positions between the genera...(HARD_TO)
[uncategorized] ~60-~60: Possible missing comma found.
Context: ...n ### Parsing terminal reports an error but the parsing was successful Prior to po...(AI_HYDRA_LEO_MISSING_COMMA)
[style] ~61-~61: ‘Prior to’ might be wordy. Consider a shorter alternative.
Context: ...n error but the parsing was successful Prior to poky Scarthgap, a random bug may occur ...(EN_WORDINESS_PREMIUM_PRIOR_TO)
[uncategorized] ~84-~84: Do not mix variants of the same word (‘analyse’ and ‘analyze’) within a single text.
Context: ...sed on Python files, it is necessary to analyse the context in which the errors are gen...(EN_WORD_COHERENCY)
[style] ~84-~84: Using two adverbs in a row like this may make your sentence unnecessarily wordy. For clarity and conciseness, see if you can omit one of them.
Context: ...sues. For this reason, these errors are currently being completely ignored. The linting errors being comp...(LY_LY)
README-DEVELOPER.md
[duplication] ~34-~34: Possible typo: you repeated a word
Context: ...VS Code and select the client or server to to launch the debug client. ### Install 1...(ENGLISH_WORD_REPEAT_RULE)
[style] ~98-~98: Consider a shorter alternative to avoid wordiness.
Context: ...s required to callnpm run fetch:wasmin order to rebuild the Wasm files. For more infor...(IN_ORDER_TO_PREMIUM)
CHANGELOG.md
[typographical] ~1-~1: If you want to indicate numerical ranges or time ranges, consider using an en dash.
Context: # 2.6.0 - 2024.06.19 - Support renaming of BitBa...(DASH_RULE)
[typographical] ~14-~14: If you want to indicate numerical ranges or time ranges, consider using an en dash.
Context: ...p CI caching - Minor bug fixes # 2.5.0 - 2024.05.28 - Add Yocto variables renam...(DASH_RULE)
[style] ~18-~18: In American English, abbreviations like “etc.” require a period.
Context: ... names in variables (DEPENDS, RDEPENDS, etc) - Add an option to prevent modificati...(ETC_PERIOD)
[typographical] ~26-~26: If you want to indicate numerical ranges or time ranges, consider using an en dash.
Context: ... remove deprecated dependencies # 2.4.0 - 2024.03.08 - Publish on open-vsx/Codiu...(DASH_RULE)
[uncategorized] ~28-~28: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...24.03.08 - Publish on open-vsx/Codium open source alternative - Add commands to start an...(EN_COMPOUND_ADJECTIVE_INTERNAL)
README.md
[uncategorized] ~29-~29: Possible missing comma found.
Context: ...by using thebitbake.workingDirectoryoption as well as the shell environment variab...(AI_HYDRA_LEO_MISSING_COMMA)
[style] ~79-~79: The phrase ‘lots of’ might be wordy and overused. Consider using an alternative.
Context: ...y, some other extensions may be hogging lots of resources to parse it's contents and st...(A_LOT_OF)
[uncategorized] ~115-~115: Possible missing comma found.
Context: ...]. [.conf,.inc`] are also supported but may be used by other tools. ![Syntax H...(AI_HYDRA_LEO_MISSING_COMMA)
[grammar] ~136-~136: It appears that a hyphen is missing (“go-to” is a compound adjective).
Context: ...a list of definitions is provided. The go to definition feature currently behaves as...(GO_TO_HYPHEN)
[grammar] ~142-~142: The verb ‘include’ does not usually follow articles like ‘the’. Check that ‘include’ is spelled correctly; using ‘include’ as a noun may be non-standard.
Context: ...appends | | symbol | all symbols within the include hierarchy | 
[uncategorized] ~154-~154: Although a hyphen is possible, it is not necessary in a compound modifier in which the first word is an adverb that ends in ‘ly’.
Context: ... suggestions Overrides, variable flags, frequently-used task names and more. ![Other-suggestio...(HYPHENATED_LY_ADVERB_ADJECTIVE)
[grammar] ~161-~161: Did you mean “building”? Or maybe you should add a pronoun? In active voice, ‘allow’ + ‘to’ takes an object, usually a pronoun.
Context: ...rough thetasks.jsonfile. They allow to build or a run any specific BitBake command o...(ALLOW_TO)
[grammar] ~161-~161: Did you mean “having”? Or maybe you should add a pronoun? In active voice, ‘require’ + ‘to’ takes an object, usually a pronoun.
Context: ...a set of recipes. This feature requires to have properly [configured the extension](#se...(ALLOW_TO)
[uncategorized] ~205-~205: Possible missing comma found.
Context: ...ree view, or in the editor's contextual menu and run the command `Bitbake: Devtool: ...(AI_HYDRA_LEO_MISSING_COMMA)
[style] ~214-~214: Consider shortening or rephrasing this to strengthen your wording.
Context: ...he-source-of-an-existing-component): - Make changes to the sources - Commit them in the local...(MAKE_CHANGES)
[duplication] ~242-~242: Possible typo: you repeated a word
Context: ...s in the command output) on hover. ### Toaster Toaster users may start toaster through the **m...(ENGLISH_WORD_REPEAT_RULE)
Markdownlint
TROUBLESHOOTING.md
69-69: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
69-69: null
Bare URL used(MD034, no-bare-urls)
README-DEVELOPER.md
128-128: Expected: dash; Actual: asterisk
Unordered list style(MD004, ul-style)
105-105: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
106-106: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
107-107: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
108-108: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
109-109: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
110-110: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
111-111: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
114-114: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
115-115: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
117-117: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
119-119: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
114-114: null
Bare URL used(MD034, no-bare-urls)
115-115: null
Bare URL used(MD034, no-bare-urls)
117-117: null
Bare URL used(MD034, no-bare-urls)
119-119: null
Bare URL used(MD034, no-bare-urls)
128-128: null
Bare URL used(MD034, no-bare-urls)
CHANGELOG.md
3-3: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
4-4: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
5-5: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
6-6: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
7-7: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
8-8: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
9-9: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
10-10: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
11-11: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
12-12: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
16-16: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
17-17: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
18-18: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
19-19: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
20-20: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
21-21: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
22-22: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
23-23: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
24-24: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
28-28: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
29-29: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
30-30: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
31-31: Expected: 2; Actual: 3
Unordered list indentation(MD007, ul-indent)
32-32: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
33-33: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
README.md
214-214: Expected: asterisk; Actual: dash
Unordered list style(MD004, ul-style)
215-215: Expected: asterisk; Actual: dash
Unordered list style(MD004, ul-style)
216-216: Expected: asterisk; Actual: dash
Unordered list style(MD004, ul-style)
219-219: Expected: asterisk; Actual: dash
Unordered list style(MD004, ul-style)
220-220: Expected: asterisk; Actual: dash
Unordered list style(MD004, ul-style)
251-251: Expected: asterisk; Actual: dash
Unordered list style(MD004, ul-style)
252-252: Expected: asterisk; Actual: dash
Unordered list style(MD004, ul-style)
253-253: Expected: asterisk; Actual: dash
Unordered list style(MD004, ul-style)
214-214: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
215-215: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
216-216: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
219-219: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
220-220: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
23-23: null
Dollar signs used before commands without showing output(MD014, commands-show-output)
27-27: null
Dollar signs used before commands without showing output(MD014, commands-show-output)
132-132: null
Link fragments should be valid(MD051, link-fragments)
147-147: null
Link fragments should be valid(MD051, link-fragments)
161-161: null
Link fragments should be valid(MD051, link-fragments)
Biome
integration-tests/src/tests/rename.test.ts
[error] 75-75: Change to an optional chain.
Unsafe fix: Change to an optional chain.
(lint/complexity/useOptionalChain)
client/src/language/diagnosticsSupport.ts
[error] 140-140: Change to an optional chain.
Unsafe fix: Change to an optional chain.
(lint/complexity/useOptionalChain)
Additional comments not posted (240)
integration-tests/project-folder/sources/meta-fixtures-versions/recipes-fixtures/fixture-version/fixture-version_0.1.0.bb (1)
5-5: LGTM! Version variable added.The addition of the
PVvariable for versioning is a good practice and aligns with BitBake standards.integration-tests/project-folder/sources/meta-fixtures-versions/recipes-fixtures/fixture-version/fixture-version_0.3.0.bb (1)
5-5: LGTM! Version variable added.The addition of the
PVvariable for versioning is a good practice and aligns with BitBake standards.server/.npmignore (1)
5-11: LGTM! Improved npm package management.The changes to the
.npmignorefile enhance control over package contents, ensuring only necessary files are included while excluding test directories and common artifacts.server/src/__tests__/fixtures/rename.bb (1)
7-11: Verify the intended behavior of theFOOfunction.The function retrieves the variable
FOOusingd.getVar('FOO')and appends it to itself. Verify if this concatenation is the intended behavior or if further logic is needed.integration-tests/project-folder/sources/meta-fixtures/references.bb (1)
8-11: Verify the intended behavior of theFOOfunction.The function retrieves the variable
FOOusingd.getVar('FOO')and appends it to itself. Verify if this concatenation is the intended behavior or if further logic is needed.scripts/update-tree-sitter-bash.sh (2)
4-4: Verify the existence of the sourced script.Ensure that the
update-tree-sitter.shscript exists in the same directory as this script.Run the following script to verify the existence of the sourced script:
Verification successful
Sourced script exists in the expected location.
The
update-tree-sitter.shscript is present in thescriptsdirectory, confirming its existence as required.
- Located at:
./scripts/update-tree-sitter.shScripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the existence of the sourced script. # Test: Check if the `update-tree-sitter.sh` script exists in the same directory. fd update-tree-sitter.sh --exec echo "Found: {}"Length of output: 89
9-9: Verify the correctness of the function call.Ensure that the
update-tree-sitterfunction is defined and correctly implemented in the sourced script.Run the following script to verify the function definition:
Verification successful
Function
update-tree-sitteris correctly defined and used.The
update-tree-sitterfunction is defined in thescripts/update-tree-sitter.shfile and is correctly sourced inscripts/update-tree-sitter-bash.sh. Therefore, the function call inscripts/update-tree-sitter-bash.shis valid.
- Definition:
scripts/update-tree-sitter.shcontains theupdate-tree-sitterfunction definition.- Usage:
scripts/update-tree-sitter-bash.shsources theupdate-tree-sitter.shscript and calls the function.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the definition of the `update-tree-sitter` function. # Test: Search for the function definition in the `update-tree-sitter.sh` script. fd update-tree-sitter.sh --exec rg --type shell 'update-tree-sitter'Length of output: 98
Script:
#!/bin/bash # Description: Verify the definition of the `update-tree-sitter` function. # Search for the function definition in shell scripts across the repository. ast-grep --lang bash --pattern 'function update-tree-sitter { $$$ }'Length of output: 415
Script:
#!/bin/bash # Description: Search for any occurrence of `update-tree-sitter` across shell scripts. # Search for any occurrence of `update-tree-sitter` in shell scripts across the repository. rg 'update-tree-sitter' --type sh -A 3Length of output: 1320
integration-tests/project-folder/sources/meta-error/conf/layer.conf (1)
12-12: Verify the validity of thescarthgapseries.Ensure that the
scarthgapseries is valid and supported for this layer.Run the following script to verify the series:
server/tsconfig.json (1)
8-8: LGTM! Streamlined build configuration.The changes to
outDirandincludeimprove the build process by directing compiled files to a new directory and focusing the compilation scope on thesrcdirectory.Also applies to: 15-15
integration-tests/src/utils/version.ts (1)
7-8: LGTM! Updated dependency versions.The updates to
bashVersionandpythonVersionensure compatibility with the latest versions, which may include new features or bug fixes.integration-tests/project-folder/sources/meta-fixtures-versions/conf/layer.conf (1)
12-12: LGTM! Expanded layer compatibility.The addition of
scarthgaptoLAYERSERIES_COMPAT_fixture-versionsexpands the compatibility of thefixture-versionslayer.server/src/__tests__/fixtures/completion.bb (3)
35-36: Position change ofdummyfunction is acceptable.The repositioning of the
dummyfunction does not affect its functionality.
32-33: Verify the implications of settingLICENSEto an empty string.Ensure that setting the
LICENSEvariable to an empty string is intentional and complies with project requirements.Run the following script to check for documentation or comments related to this change:
29-30: Verify that$Dis correctly set in the environment.Ensure that the variable
$Dis set and has the expected value in the environment where this script is executed.Run the following script to check the setting of
$Din relevant files:scripts/update-tree-sitter.sh (1)
1-6: Initial setup and error handling are appropriate.The use of
set -euox pipefailensures robust error handling.server/package.json (4)
4-4: Version update approved.The version bump to
2.6.0is appropriate for the changes made.
23-26: Dependency updates approved.The addition of
node-cacheand updates tovscode-languageserverandweb-tree-sitterare appropriate. Ensure compatibility with the rest of the codebase.
29-29: Script change approved.The modification to the
prepackscript aligns with the project's build process.
32-32: DevDependencies update approved.The reduction in
devDependenciesto only include@types/vscodeis acceptable.client/package.json (2)
14-14: Version update approved.The version bump to
2.5.0is appropriate for the changes made.
28-34: Dependency updates approved.The updates to
find,vscode-languageclient, and@types/vscodeare appropriate. Ensure compatibility with the rest of the codebase.client/src/lib/src/types/notifications.ts (1)
10-11: Addition ofScanCompletenotification type is appropriate.The introduction of the
ScanCompletenotification type and its corresponding method enhances the notification system's functionality. The changes follow the existing pattern and are consistent with the rest of the code.Also applies to: 16-17
server/src/__tests__/fixtures/hover.bb (2)
55-55: Addition ofLICENSEvariable enhances documentation.The inclusion of the
LICENSEvariable provides clear licensing information, which is beneficial for code documentation.
52-54: Verify the changes indo_foofunction.The changes in the
do_foofunction alter how theDESCRIPTIONvariable is used. Ensure that this modification aligns with the intended functionality.Run the following script to verify the usage and impact of the
DESCRIPTIONvariable:Also applies to: 57-57
Verification successful
Verified the changes in
do_foofunction.The usage of the
DESCRIPTIONvariable in thedo_foofunction is consistent with its usage throughout thehover.bbfile. There are no issues with how it is utilized in this context.
- The
DESCRIPTIONvariable is used in string interpolations and directly as a variable indo_foo.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of the `DESCRIPTION` variable. # Test: Search for all occurrences of `DESCRIPTION`. Expect: Consistent usage across the file. rg --type bb -A 5 $'DESCRIPTION'Length of output: 58
Script:
#!/bin/bash # Description: Verify the usage of the `DESCRIPTION` variable in hover.bb. # Test: Search for all occurrences of `DESCRIPTION` in hover.bb and include context lines. rg 'DESCRIPTION' -A 5 -B 5 server/src/__tests__/fixtures/hover.bbLength of output: 1009
scripts/build-tree-sitter-wasm.sh (1)
1-26: The script for updating tree-sitter WASM modules is well-structured.The script follows best practices for bash scripting, including robust error handling with
set -euox pipefail. The functionupdate-tree-sitter-wasmis clearly defined and effectively updates the tree-sitter WASM modules.integration-tests/project-folder/.vscode/settings.json (3)
18-18: Ensure correct value type foreditor.wordBasedSuggestions.The setting
"editor.wordBasedSuggestions"has been changed fromfalseto"off". Ensure that"off"is a valid value for this setting, as it typically expects a boolean.
25-29: Review file associations for accuracy.The new file associations map
*.txttodiffand*.conf,*.inctobitbake. Ensure these mappings align with your project's requirements and that the language modes are correctly supported.
30-32: Verify BitBake settings.The new settings for BitBake integration (
bitbake.buildConfigurations,bitbake.commandWrapper,bitbake.workingDirectory) should be verified to ensure they are correctly configured for your workspace.server/src/tree-sitter/parser.ts (3)
13-19: ParameterizegenerateParserfor flexibility.The
generateParserfunction now accepts awasmPathparameter, enhancing flexibility. Ensure that all calls to this function provide the correct path.
23-26: Encapsulate BitBake parser logic.The
generateBitBakeParserfunction encapsulates the logic for loading the BitBake WASM file. This improves modularity and reusability.
28-31: Encapsulate Bash parser logic.The
generateBashParserfunction encapsulates the logic for loading the Bash WASM file. This improves modularity and reusability.server/src/BitbakeProjectScannerClient.ts (1)
21-25: Implement robust scan results management.The
setScanResultsmethod improves robustness by conditionally updating scan results based on recipe presence. This ensures language features remain functional despite parsing errors..github/workflows/update-ref.yml (4)
9-9: Job name change is appropriate.The change from
buildtoupdate-refsaccurately reflects the job's purpose.
20-20: Introduction ofBASE_BRANCHis a good practice.Using
BASE_BRANCHensures that the workflow operates on the intended branch.
24-24: Simplification ofnode-versionis beneficial.Directly assigning
node-version: 20simplifies the configuration and is a good practice.
30-30: Verify the new workflow functionality.Ensure that the changes to the workflow operate as expected, especially the use of
BASE_BRANCHin the checkout step.Run the following script to verify the workflow configuration:
Verification successful
Workflow functionality verified successfully.
The
BASE_BRANCHis correctly used in the workflow for both the checkout and pull request creation steps. The environment variable is set tostaging, which is consistent with its intended use.
- File:
.github/workflows/update-ref.yml- Usage: Checkout step and pull request creation step.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of BASE_BRANCH in the workflow. # Test: Search for the BASE_BRANCH usage. Expect: Correct usage in checkout and other steps. rg --type yaml 'BASE_BRANCH'Length of output: 177
Script:
#!/bin/bash # Locate the .github/workflows/update-ref.yml file and check for BASE_BRANCH usage. # Find the workflow file fd update-ref.yml .github/workflows # Display the contents of the workflow file to verify BASE_BRANCH usage cat .github/workflows/update-ref.ymlLength of output: 1407
client/src/language/RequestManager.ts (1)
22-34: Method replacement aligns with LSP practices.The change from
getAllVariableValuestogetDefinitionimproves document-centric operations and error handling.Ensure that all calls to
getAllVariableValueshave been updated togetDefinitionwith the correct parameters.
Run the following script to verify the method usage:Verification successful
Method replacement verified successfully.
The transition from
getAllVariableValuestogetDefinitionhas been implemented correctly. The methodgetDefinitionis being used with the expected parameters in the codebase.
client/src/language/diagnosticsSupport.ts: Usage ofgetDefinition.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of getDefinition in the codebase. # Test: Search for the getDefinition usage. Expect: Correct usage with TextDocument and Position parameters. rg --type typescript 'getDefinition'Length of output: 71
Script:
#!/bin/bash # Description: Verify the usage of getDefinition in the codebase. # Test: Search for the getDefinition usage in TypeScript files. rg 'getDefinition' --glob '*.ts'Length of output: 1834
integration-tests/src/utils/bitbake.ts (2)
30-32: Introduction ofremoveRecipeenhances functionality.The
removeRecipefunction streamlines the deletion of recipes from thepokypath.Ensure that the
removeRecipefunction is used correctly in the codebase.
Run the following script to verify the function usage:Verification successful
Function
removeRecipeis used correctly in the codebase.The
removeRecipefunction is utilized in various test files with the expected parameters, ensuring its functionality is verified.
- Located in
integration-tests/src/utils/bitbake.ts.- Used in
client/src/__tests__/unit-tests/driver/scanner.test.ts.- Used in
integration-tests/src/tests/bitbake-parse.test.ts.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of removeRecipe in the codebase. # Test: Search for the removeRecipe usage. Expect: Correct usage with recipePath and pokyPath parameters. rg --type typescript 'removeRecipe'Length of output: 70
Script:
#!/bin/bash # Description: Verify the usage of removeRecipe in the codebase by searching in .ts files. # Test: Search for the removeRecipe usage. Expect: Correct usage with recipePath and pokyPath parameters. rg 'removeRecipe' --glob '*.ts' -A 3Length of output: 2574
24-27: Introduction ofimportRecipeenhances functionality.The
importRecipefunction facilitates recipe management by copying recipes into thepokypath.Ensure that the
importRecipefunction is used correctly in the codebase.
Run the following script to verify the function usage:Verification successful
Function
importRecipeis correctly integrated and tested in the codebase.The
importRecipefunction is used in test files, which suggests that its functionality is being verified through tests. This confirms its correct integration within the codebase.
- Files where
importRecipeis used:
integration-tests/src/tests/bitbake-parse.test.tsclient/src/__tests__/unit-tests/driver/scanner.test.tsScripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of importRecipe in the codebase. # Test: Search for the importRecipe usage. Expect: Correct usage with recipePath and pokyPath parameters. rg --type typescript 'importRecipe'Length of output: 70
Script:
#!/bin/bash # Description: Verify the usage of importRecipe in the codebase. # Test: Search for the importRecipe usage in TypeScript files. rg 'importRecipe' --glob '*.ts' -A 2Length of output: 2079
server/src/utils/textDocument.ts (3)
8-20: FunctiongetLinelooks good.The function correctly retrieves a line from the document using a range.
22-31: FunctiongetPreviousCharactersOnLinelooks good.The function correctly retrieves characters from the start of the line to the specified position.
33-62: FunctiongetRangeOfWordlooks good.The function accurately determines the range of a word using boundary conditions.
server/src/connectionHandlers/onReference.ts (1)
31-35: FunctiononReferenceHandlerlooks good.The use of
analyzer.getAllSymbolssimplifies the symbol retrieval process.However, verify that this change does not affect the expected behavior of the function in other parts of the codebase.
Run the following script to check for function usage and ensure it aligns with the new logic:
Verification successful
Function
onReferenceHandlerusage verified.The function is correctly used in
server/src/server.tsand thoroughly tested inserver/src/__tests__/onReference.test.ts. The change to useanalyzer.getAllSymbolsaligns with the expected logic and is covered by existing tests.
server/src/server.ts: Usage as part of a connection handler.server/src/__tests__/onReference.test.ts: Tests verifying functionality.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of `onReferenceHandler` to ensure it aligns with the new logic. # Test: Search for the function usage. Expect: No mismatches in logic. rg --type javascript -A 5 $'onReferenceHandler'Length of output: 81
Script:
#!/bin/bash # Description: Verify the usage of `onReferenceHandler` to ensure it aligns with the new logic. # Test: Search for the function usage. Expect: No mismatches in logic. rg --type js -A 5 $'onReferenceHandler'Length of output: 38
Script:
#!/bin/bash # Description: Search for the definition of `onReferenceHandler` and any variations in its usage. # Search for the function definition in TypeScript files. ast-grep --lang typescript --pattern 'function onReferenceHandler($_) { $$$ }' # Search for any potential aliases or different naming conventions. rg 'onReferenceHandler'Length of output: 697
server/src/connectionHandlers/onRename.ts (2)
9-37: FunctiononRenameRequestHandlerlooks good.The function correctly handles rename requests by identifying symbols and constructing workspace edits.
39-57: FunctiononPrepareRenameHandlerlooks good.The function correctly prepares for a rename by identifying the symbol and returning the necessary information.
integration-tests/src/runTest.ts (2)
17-17: Upgrade VSCode version.The VSCode version has been updated from '1.84.2' to '1.89.1'. Ensure compatibility with the new version, especially regarding extensions and test scripts.
35-35: Update extension development path.The
extensionDevelopmentPathhas been broadened from'../../client/'to'../../'. Verify that this change aligns with the intended directory structure and includes all necessary resources.client/src/lib/src/types/requests.ts (4)
13-14: Add new request types toRequestTypeenum.The
GetVarandGetRecipeLocalFilesrequest types have been added, expanding the range of operations supported by the API.
21-22: UpdateRequestMethodwith new entries.Entries for
GetVarandGetRecipeLocalFileshave been added toRequestMethod, linking them to their respective API endpoints.
29-30: Define parameters for new request types inRequestParams.Parameters for
GetVarandGetRecipeLocalFileshave been defined, enhancing the flexibility of request handling.
37-37: UpdateRequestResultwith new return structure.The return structure for
GetRecipeLocalFileshas been added, providing a structured response for clients querying local files.server/src/embedded-languages/general-support.ts (2)
20-29: EnhancegenerateEmbeddedLanguageDocswith additional parameters.The function now passes
analyzedDocument.documentandanalyzedDocument.bitBakeTreeto the embedded language doc generators, improving the analysis of document structure.
34-44: Streamline logic ingetEmbeddedLanguageTypeOnPosition.The function now retrieves a
bitBakeNodeand uses it to determine the language type, enhancing clarity and accuracy in identifying embedded languages.server/src/__tests__/fixtures/fixtures.ts (1)
36-36: LGTM! Addition ofRENAMEentry is consistent.The new
RENAMEentry in theFIXTURE_URIobject follows the existing pattern and enhances the fixture's utility..github/workflows/update-tree-sitter-parser-info-file.yml (1)
1-68: LGTM! Well-structured GitHub Actions workflow.The workflow for updating Tree Sitter parser info files is well-organized and follows best practices, including matrix strategy and caching.
client/src/ui/BitbakeWorkspace.ts (1)
14-17: LGTM! Introduction ofEventTypeimproves maintainability.The static
EventTypeobject centralizes event type definitions, enhancing code maintainability and reducing the risk of typos..vscode/launch.json (5)
11-16: LGTM! Consistent use of${workspaceRoot}.The changes enhance flexibility by using
${workspaceRoot}and correctly include server output files.
27-33: LGTM! Consistent use of${workspaceRoot}.The changes enhance flexibility by using
${workspaceRoot}and correctly include server output files.
45-45: LGTM! Consistent use of${workspaceRoot}.The changes enhance flexibility by using
${workspaceRoot}and correctly include server output files.
57-57: LGTM! Consistent use of${workspaceRoot}.The changes enhance flexibility by using
${workspaceRoot}and correctly include server output files.
69-78: LGTM! Consistent use of${workspaceRoot}.The changes enhance flexibility by using
${workspaceRoot}and correctly include integration test output files.integration-tests/src/tests/bitbake-parse.test.ts (4)
9-10: LGTM! New utility functions imported.The
importRecipeandremoveRecipefunctions are correctly imported for use in the test suite.
14-24: LGTM! Focused setup for test paths.The
suiteSetupinitializes paths specific to the test objectives, improving clarity and focus.
27-30: LGTM! Streamlined teardown process.The
suiteTeardownusesremoveRecipefor focused cleanup, aligning with the test objectives.
34-61: LGTM! Focused test logic for parsing errors.The test uses
importRecipeand checks diagnostics effectively, aligning with the test objectives.client/src/__tests__/unit-tests/ui/devtool-workspaces-view.test.ts (1)
66-66: LGTM! Improved event type usage.The use of
BitBakeProjectScanner.EventType.SCAN_COMPLETEenhances type safety and maintainability.scripts/update-ref.sh (5)
5-10: Efficient use ofgit ls-remote.The changes improve performance by fetching the latest references directly from the remote repository.
15-16: Efficient update ofbashVersion.The changes improve performance by directly fetching the latest commit from the remote repository.
18-19: Efficient update ofpythonVersion.The changes improve performance by directly fetching the latest commit from the remote repository.
24-29: Efficient update offetch-docs.sh.The changes improve performance by fetching the latest references directly from the remote repository.
31-52: Efficient update offetch-spdx-licenses.sh.The changes improve performance by fetching the latest references directly from the remote repository.
integration-tests/src/tests/references.test.ts (3)
37-37: Improved validation criteria.The change ensures that the number of references found matches the expected references exactly.
46-50: Enhanced test clarity for local Python variable.The updated test name and position improve specificity and accuracy.
55-65: Enhanced test clarity for global variable.The updated test name and reference ranges improve specificity and accuracy.
server/src/completions/spdx-licenses.ts (4)
6-12: Well-organized imports.The imports are necessary for the functionality provided in the file and are well-structured.
15-26: Clear definition oflicenseOperators.The completion items for operators are correctly defined and use
CompletionItemKind.Operator.
28-61: Well-implementedgetLicenseCompletionItemsfunction.The function correctly fetches license data and returns completion items, following best practices.
63-75: Well-implementedgetSpdxLicenseCompletionResolvefunction.The function correctly resolves completion items with license details and handles errors with logging.
client/src/__tests__/unit-tests/ui/bitbake-recipes-view.test.ts (1)
79-79: Good use of a constant for event type.Changing the event type from a string literal to
BitBakeProjectScanner.EventType.SCAN_COMPLETEenhances maintainability and reduces the risk of errors associated with string literals.integration-tests/src/tests/bitbake-commands.test.ts (2)
68-76: Consider reintroducing cleanup logic.The removal of
suiteTeardownmight lead to leftover artifacts from tests. Consider reintroducing cleanup logic to ensure test isolation.
68-76: Updated file pattern checks and reset command enhance test robustness.The change in file pattern checks and the addition of the reset command ensure that the test environment is correctly set up and cleaned up, improving test reliability.
client/src/language/middlewareReferences.ts (2)
14-17: Improved handling ofnextResult.The changes ensure that
nextResultis only used if it is an array, improving the robustness of the function.
69-79: Renaming toadjustedRangeenhances clarity.The renaming of
newRangetoadjustedRangemakes the code more readable and semantically clear.server/src/utils/spdx-licenses.ts (5)
11-15: InterfaceSpdxLicenseCollectionis well-defined.The structure aligns with typical SPDX license collection data.
17-26: InterfaceSpdxLicenseis well-defined.The structure aligns with typical SPDX license data.
28-45: InterfaceSpdxLicenseDetailsis well-defined.The structure aligns with typical SPDX license detail data.
64-75: FunctiongetSpdxLicensesis well-implemented.The caching mechanism is correctly used to improve performance.
77-81: FunctiongetSpdxLicenseis well-implemented.The function correctly retrieves a specific license by ID.
server/src/__tests__/semanticTokens.test.ts (3)
13-16: Parser setup inbeforeAllis well-implemented.The setup correctly initializes multiple parsers and resets analyzed documents.
Line range hint
18-20: Setup inbeforeEachis well-implemented.The setup ensures a clean state for each test by resetting analyzed documents.
Line range hint
22-119: Test case for semantic tokens is well-implemented.The test is comprehensive and aligns with the new functionality, ensuring correct parsing and categorization of tokens.
client/src/__tests__/unit-tests/driver/eSDKMode.test.ts (3)
Line range hint
10-12: Setup inafterEachis well-implemented.The setup ensures a clean state after each test by clearing mocks and resetting the eSDK mode.
Line range hint
14-31: Test case for scanning devtool without bitbake is well-implemented.The test correctly mocks necessary functions and verifies expected behavior.
Line range hint
33-78: Test case for detecting eSDK mode is well-implemented.The test is robust and flexible, ensuring correct detection of eSDK mode across different environments.
client/src/ui/DevtoolWorkspacesView.ts (2)
8-8: LGTM! The import change is appropriate.The change from a type import to a regular import for
BitBakeProjectScanneraligns with its usage as a class or object.
30-30: LGTM! Improved event handling.The update to listen for
SCAN_COMPLETEinstead ofscanReadyensures that the application responds only when the scan is fully complete, enhancing reliability.client/src/driver/BitbakeRecipeScanner.ts (3)
19-19: LGTM! Event emitter type change is appropriate.Changing the event emitter type from
vscode.Uritovscode.TaskDefinitionaligns with the shift in focus to task definition-based handling, which can improve specificity and relevance.
57-58: LGTM! Consistent event listener update.The update to accept a
TaskDefinitioninstead of aUriin the event listener callback ensures consistency with the new event emitter type.
81-81: LGTM! Event firing update is consistent.Using
e.execution.task.definitioninstead ofurifor firing the event aligns with the task definition-based handling, improving integration with the task management system.server/src/__tests__/onReference.test.ts (2)
9-19: LGTM! Enhanced parser initialization.Using
generateBashParserandgenerateBitBakeParserallows for multiple parsing strategies, increasing versatility and robustness.
16-16: LGTM! Condition check update is appropriate.Updating the condition from
hasParser()tohasParsers()aligns with the new multi-parser setup, ensuring correct initialization logic.server/src/__tests__/onRename.test.ts (2)
22-37: Test case foronRenameRequestHandleris well-structured.The test correctly checks that no rename is prompted when the position is not a symbol.
39-156: Test case foronRenameRequestHandleris comprehensive.The test correctly verifies the expected edits for multiple positions.
server/src/embedded-languages/bash-support.ts (3)
50-57: FunctiongetBashHeaderis well-implemented.The function provides a dynamic way to generate headers for Bash scripts.
58-60: FunctioninsertBashHeaderis straightforward.The function correctly inserts a Bash header into the document.
Line range hint
23-45: FunctiongenerateBashEmbeddedLanguageDocis enhanced.The changes improve flexibility by allowing more control over the document's output format.
Ensure that all calls to
generateBashEmbeddedLanguageDocare updated to match the new signature.
Run the following script to verify the function usage:Verification successful
Function
generateBashEmbeddedLanguageDoccalls are correctly updated.All calls to
generateBashEmbeddedLanguageDochave been updated to match the new signature, ensuring consistency across the codebase.
server/src/tree-sitter/analyzer.ts: Correct usage with the new signature.server/src/embedded-languages/general-support.ts: Correct usage with the new signature.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `generateBashEmbeddedLanguageDoc` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type javascript -A 5 $'generateBashEmbeddedLanguageDoc'Length of output: 94
Script:
#!/bin/bash # Description: Verify all function calls to `generateBashEmbeddedLanguageDoc` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type ts -A 5 $'generateBashEmbeddedLanguageDoc'Length of output: 2608
client/src/language/middlewareRename.ts (2)
13-67: FunctionmiddlewareProvideRenameEditsis well-structured.The function effectively manages rename operations for embedded languages.
72-125: FunctionmiddlewarePrepareRenameis robust.The function correctly prepares rename operations and handles error scenarios.
.github/workflows/main.yml (5)
35-39: Ensure cache paths are correct.Verify that the paths specified for caching dependencies are correct and necessary. Incorrect paths can lead to cache misses or unnecessary cache usage.
50-51: Verify apt dependencies installation.Ensure that the
chrpathanddiffstatpackages are required for the build process. Unnecessary installations can slow down the workflow.
53-65: Verify fetch scripts and cache keys.Ensure that the cache keys and fetch scripts are correctly configured. Incorrect configurations can lead to cache misses or redundant fetch operations.
129-147: LGTM!The steps for building the standalone language server are correctly configured.
156-164: LGTM!The steps for publishing to npm are correctly configured.
client/src/ui/BitbakeStatusBar.ts (2)
29-34: LGTM!The use of enums for event names improves type safety and maintainability.
100-100: LGTM!The addition of the 'taskexp' condition improves user feedback in the status bar.
client/src/documentLinkProvider.ts (2)
22-44: LGTM!The
findFilesAndDirsmethod encapsulates file and directory searching logic, improving maintainability and readability.
46-52: LGTM!The streamlined
getLocalFoldersForRecipeUrimethod enhances code clarity.server/src/embedded-languages/python-support.ts (3)
Line range hint
24-44: LGTM! Improved integration with parsing library.The changes to the function signature and internal logic enhance the integration with the parsing library.
48-55: LGTM! Well-structured header construction.The function is well-structured and enhances code organization.
57-59: LGTM! Effective header insertion.The function is straightforward and performs its task effectively.
server/src/semanticTokens.ts (3)
82-118: LGTM! Well-implemented Bash token parsing.The function is well-implemented and handles the absence of a syntax tree gracefully.
Line range hint
120-174: LGTM! Improved parsing strategy for BitBake tokens.The update reflects a shift in the parsing strategy and improves the function's robustness.
175-186: LGTM! Effective aggregation of parsed tokens.The function effectively combines and sorts tokens from multiple sources.
server/src/tree-sitter/declarations.ts (2)
Line range hint
46-74: LGTM! Enhanced clarity with parameter renaming.The renaming enhances clarity and aligns the parameter with its intended use case.
83-92: LGTM! Precise parameter definition.The renaming provides a more precise definition of the parameter's purpose.
client/src/ui/BitbakeRecipesView.ts (4)
7-7: LGTM: Import change forBitbakeWorkspace.The change from a type-only import to a regular import is appropriate given its functional usage in the file.
10-10: LGTM: Import change forBitBakeProjectScanner.The change from a type-only import to a regular import is appropriate given its functional usage in the file.
60-66: LGTM: Use of enums for event handling.Replacing string literals with enums enhances type safety and maintainability.
127-127: LGTM: Sorting logic improvement.Using
localeComparefor sorting ensures consistent and predictable order for displayed recipes.integration-tests/src/tests/rename.test.ts (2)
59-77: LGTM: Well-structuredtestPrepareRenamefunction.The function is well-implemented and effectively handles errors.
Tools
Biome
[error] 75-75: Change to an optional chain.
Unsafe fix: Change to an optional chain.
(lint/complexity/useOptionalChain)
81-97: LGTM: Well-structuredtestInvalidRenamefunction.The function is well-implemented and effectively asserts the expected error message.
README-DEVELOPER.md (1)
11-19: Installation instructions are clear and complete.The instructions for installing the extension from the VS Code Extension Marketplace and manually are well-documented.
server/src/__tests__/embedded-languages.test.ts (4)
Line range hint
17-52: Test improvements for embedded bash documents are well-implemented.The use of unique URIs and proper parser initialization enhances test robustness.
Line range hint
58-97: Test improvements for embedded python documents are well-implemented.The use of unique URIs and proper parser initialization enhances test robustness.
Line range hint
103-153: Test improvements for inline Python content are well-implemented.The use of unique URIs and well-structured test cases enhances test robustness.
Line range hint
160-214: Comprehensive tests for embedded language type detection.The test cases effectively verify the detection of embedded language types.
client/src/language/languageClient.ts (4)
Line range hint
39-109: Modernized configuration management and request handling.The changes enhance clarity and maintainability by adopting a modern approach to configuration management and introducing a structured request method.
161-179: Enhanced error handling and user feedback ingetScanResult.The use of a try-catch block and progress notifications improves resilience and user experience.
188-188: Correct usage ofgetScanResultingetVariableValue.The function correctly utilizes
getScanResultfor variable retrieval.
91-109: Improved error logging and handling for request methods.The changes enhance error logging and handling for missing URIs.
client/src/language/middlewareDefinition.ts (2)
96-100: Variable renaming enhances clarity.The renaming of
newRangetoadjustedRangeimproves code readability without altering the logic.
Line range hint
139-150: Verify updated range and position values.The updated values for
dRange,dataSmartPosition,eRange, andeventPositionshould align with the new document structure. Ensure these changes are consistent with the intended document layout.client/src/__tests__/unit-tests/driver/scanner.test.ts (4)
12-12: Imports updated for recipe management.The imports for
importRecipeandremoveRecipereplace the previous layer management functions, aligning with the new focus on recipe management.
22-22: Logger level set to 'debug'.Setting the logger level to 'debug' can help with troubleshooting during test runs. Ensure this setting is suitable for the test environment.
38-53: Setup updated for recipe management.The
beforeAllsetup now imports recipes and appends a configuration tolocal.conf, aligning with the new focus on recipe management.
62-67: Teardown updated for recipe management.The
afterAllteardown now removes recipes, ensuring the test environment is cleaned up appropriately.server/src/connectionHandlers/onHover.ts (2)
14-14: SPDX license imports added.The imports for
getSpdxLicenseandgetSpdxLicenseDetailsare necessary for the new license management functionality.
106-130: Hover functionality enhanced with license information.The
onHoverHandlerfunction now includes checks for BitBake variables and SPDX license information, enhancing the hover capabilities.client/src/language/diagnosticsSupport.ts (4)
16-17: LGTM!The
supportedSourcesconstant is a good addition for tracking external sources that may generate diagnostics.
118-136: LGTM!The
checkIsIgnoredDiagnosticfunction is well-structured and effectively consolidates checks for ignoring diagnostics.
245-270: LGTM!The
fixDiagnosticMessagePythonImportfunction effectively refines diagnostic messages related to Python imports.
59-90: LGTM! But verify the function usage in the codebase.The changes to
updateDiagnosticsimprove the handling and filtering of diagnostics.Ensure that all function calls to
updateDiagnosticsare updated accordingly.Run the following script to verify the function usage:
Verification successful
Let's rerun the search for the
updateDiagnosticsfunction without specifying the file type to ensure we capture all usages across the codebase.
Function Usage Verified:
updateDiagnosticsThe
updateDiagnosticsfunction is used in the following locations, and the usage is consistent with the updated logic:
client/src/language/languageClient.ts: The function is correctly imported and used.No further updates are needed for other parts of the codebase.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `updateDiagnostics`. # Test: Search for the function usage. Expect: Only occurrences of the updated logic. rg --type typescript -A 5 $'updateDiagnostics'Length of output: 80
Script:
#!/bin/bash # Description: Verify all function calls to `updateDiagnostics`. # Test: Search for the function usage. Expect: Only occurrences of the updated logic. rg -A 5 'updateDiagnostics'Length of output: 2214
server/src/BitBakeDocScanner.ts (2)
78-78: LGTM!Changing
_docPathtoreadonlyenhances the immutability of the class.
113-113: LGTM!The
parseDocsmethod consolidates parsing operations effectively, simplifying the class interface.README.md (5)
51-71: LGTM!The section on defining multiple configurations is clear and well-structured.
76-101: LGTM!The additional settings recommendations are informative and provide practical advice.
Tools
LanguageTool
[style] ~79-~79: The phrase ‘lots of’ might be wordy and overused. Consider using an alternative.
Context: ...y, some other extensions may be hogging lots of resources to parse it's contents and st...(A_LOT_OF)
247-258: LGTM!The linting section is clear and informative.
Tools
Markdownlint
251-251: Expected: asterisk; Actual: dash
Unordered list style(MD004, ul-style)
252-252: Expected: asterisk; Actual: dash
Unordered list style(MD004, ul-style)
253-253: Expected: asterisk; Actual: dash
Unordered list style(MD004, ul-style)
259-261: LGTM!The troubleshooting section is concise and serves its purpose.
266-274: LGTM!The contributing section is clear and encourages user contributions.
server/src/__tests__/analyzer.test.ts (4)
6-6: Import statement update is correct.The import of
generateBashParserandgenerateBitBakeParserreflects the new parser functions.
16-19:getAnalyzerfunction initialization is correct.The
Analyzeris now initialized with bothbitBakeParserandbashParser, which enhances its parsing capabilities.
169-172: Test case update forgetDirectiveFileUrisis correct.The use of
bitBakeParseraligns with the new parser logic.
407-413: Test case update forgetVariableExpansionSymbolsis correct.The retrieval of
bitBakeTreeand use ofgetSymbolsFromBitBakeTreealigns with the updated structure.client/src/extension.ts (5)
30-30: Import statement update is correct.The import of
NotificationMethodis correctly added to support the updated event handling logic.
42-45:canModifyConfigfunction addition is correct.The function effectively controls configuration changes based on the
disableConfigModificationsetting.
65-67: Conditional update inconfigureBitBakeFileAssociationis correct.The use of
canModifyConfigto conditionally update file associations aligns with user preferences.
88-90: Conditional update inupdatePythonPathis correct.The use of
canModifyConfigto conditionally update Python paths respects user settings.
216-257: Event handling logic expansion is correct.The additional checks for document type and parsing settings provide more granular control over document events.
server/src/__tests__/definition.test.ts (2)
7-7: Import statement update is correct.The import of
generateBashParserandgenerateBitBakeParserreflects the new parser functions.
16-19:beforeAllsetup function update is correct.The function now accommodates multiple parsers, enhancing the test setup for the
onDefinitionfunctionality.server/src/__tests__/hover.test.ts (3)
8-8: Import statement approved.The import of
generateBashParserandgenerateBitBakeParseris necessary for the updated parser initialization logic.
17-20: Parser initialization logic approved.The updated
beforeAllsetup correctly initializes bothbitBakeParserandbashParser, enhancing the parsing capabilities.
Line range hint
502-512: Hover test cases approved.The updated test cases accurately reflect the expected behavior of the hover functionality, ensuring comprehensive coverage.
Also applies to: 527-549, 738-761
server/src/connectionHandlers/onCompletion.ts (6)
28-28: Import statement approved.The import of SPDX license completion functions is necessary for the new license completion functionality.
Line range hint
32-57: AsynchronousonCompletionHandlerapproved.The conversion to asynchronous and improved context detection logic enhances the completion handler's functionality.
60-109: AsynchronousgetBitBakeCompletionItemsapproved.The conversion to asynchronous and refined logic for handling completion items enhance the function's robustness.
Line range hint
356-389: EnhancedconvertElementInfoListToCompletionItemListapproved.The additional
nameOnlyparameter provides flexibility in generating completion item labels, enhancing the function's utility.
Line range hint
392-406: Improved type safety ingetFilePathapproved.The updated function signature enhances type safety by restricting the
fileTypeparameter to specific values.
470-477: NewonCompletionResolveHandlerfunction approved.The addition of this asynchronous function enhances the resolution of completion items, ensuring correct handling and logging.
client/src/driver/BitBakeProjectScanner.ts (5)
39-42: StandardizedEventTypeproperty approved.The addition of
EventTypeimproves code readability and standardizes event emission, reducing the risk of typos.
51-51: Version tracking with_scanResultVersionapproved.The introduction of
_scanResultVersionenhances maintainability by allowing version tracking of scan results.
80-82: NewscanResultVersiongetter method approved.The getter method provides controlled access to
_scanResultVersion, enhancing encapsulation.
96-96: Standardized event emission logic approved.The use of
EventTypeconstants standardizes event emission, reducing the risk of typos in string literals.Also applies to: 105-105, 123-127
371-371: Improved layer matching logic approved.The updated condition enhances the robustness of the scanning logic by allowing more flexible matching of layer information.
client/src/ui/BitbakeCommands.ts (5)
53-53: Command registration looks good.The registration for
bitbake.clear-workspace-stateis correctly implemented.
54-54: Command registration looks good.The registration for
bitbake.examine-dependency-taskexpis correctly implemented.
73-80: Function implementation looks good.The
clearAllWorkspaceStatefunction correctly clears the workspace state and logs the results.
548-548: Variable introduction looks good.The
isTaskexpStartedvariable is correctly introduced to manage the state of task execution.
550-572: Function implementation looks good.The
examineDependenciesTaskexpfunction correctly manages task execution and provides appropriate user feedback.package.json (12)
3-3: Addition ofdisplayNameis appropriate.The
displayNamefield enhances the visibility of the extension in the VS Code marketplace.
14-14: Version update is appropriate.Updating the version to
2.6.0signifies a major release with new features and improvements.
16-16: Addition oficonis appropriate.The
iconfield provides a visual representation for the extension, enhancing user experience.
25-27: Addition ofenginesis appropriate.Specifying the VS Code version ensures compatibility with the latest features of the editor.
28-30: Addition ofcategoriesis appropriate.Categorizing the extension under "Programming Languages" helps users find it more easily.
31-34: Addition ofactivationEventsis appropriate.Specifying activation events helps improve performance by loading the extension only when needed.
37-219: Expansion ofcontributesis appropriate.The expanded
contributessection introduces support for the BitBake language, enhancing syntax highlighting and language features.
876-877: Addition of new scripts is appropriate.The new scripts reflect a broader scope of functionality for the extension.
872-872: Update topostinstallscript is appropriate.The updated
postinstallscript ensures that all necessary components are installed correctly.
898-917: Update todevDependenciesis appropriate.Updating the
devDependenciesensures that the extension remains up-to-date with the latest type definitions and development tools.
882-888: Refinement ofeslintandjestconfigurations is appropriate.The refinements indicate ongoing improvements in code quality and testing practices.
919-922: Addition ofvsceconfiguration is appropriate.The
vsceconfiguration provides base URLs for content and images, enhancing the extension's integration with the VS Code marketplace.server/src/__tests__/completions.test.ts (20)
23-26: Initialization and reset setup is appropriate.The
beforeAllfunction correctly initializes parsers and resets documents, ensuring a clean state for tests.
Line range hint
42-75: Test for reserved variables and keywords is well-structured.The test effectively checks for static and fallback completion items and handles document scanning appropriately.
183-191: Test for absence of suggestions in string content is correct.The test accurately verifies that no completion suggestions are provided in specific string contexts.
202-245: Test for recipe suggestions in variable assignments is effective.The test uses mock data to verify recipe suggestions, ensuring the completion handler functions correctly.
248-300: Test for URI suggestions inSRC_URIis well-implemented.The test correctly sets up local files and verifies URI suggestions, ensuring the completion handler's functionality.
Line range hint
302-317: Test for duplicate completion items is appropriate.The test effectively ensures that no duplicate suggestions are provided for local custom variables.
Line range hint
335-359: Test for variable expansion suggestions is well-structured.The test accurately verifies completion items in variable expansion contexts, ensuring the handler's functionality.
Line range hint
381-417: Test for operator suggestions is comprehensive.The test accurately verifies operator suggestions when typing ":", ensuring the completion handler's functionality.
Line range hint
467-479: Test for override suggestions is appropriate.The test effectively verifies override suggestions following an identifier, ensuring the completion handler's functionality.
Line range hint
495-503: Test for invalid override syntax is correct.The test accurately ensures no suggestions are provided for invalid override syntax.
Line range hint
514-537: Test for variable flag suggestions is comprehensive.The test accurately verifies suggestions when typing "[" after an identifier, ensuring the completion handler's functionality.
Line range hint
570-582: Test for invalid variable flag syntax is correct.The test accurately ensures no suggestions are provided for invalid variable flag syntax.
Line range hint
648-754: Test for directive statement suggestions is comprehensive.The test accurately verifies suggestions after keywords like "include", "inherit", and "require", ensuring the completion handler's functionality.
Line range hint
809-850: Test for extra symbols in directive statements is comprehensive.The test accurately verifies extra symbols from files in directive statements, ensuring the completion handler's functionality.
Line range hint
907-972: Test for python datastore variable suggestions is comprehensive.The test accurately verifies completion items on python datastore variables, ensuring the completion handler's functionality.
Line range hint
1034-1066: Test for variable expansion in bash is comprehensive.The test accurately verifies completion items in variable expansion contexts in bash, ensuring the completion handler's functionality.
1075-1109: Test for simple variable expansion in bash is comprehensive.The test accurately verifies completion items on simple variable expansion in bash, ensuring the completion handler's functionality.
Line range hint
1123-1153: Test for common directories completion items is comprehensive.The test accurately verifies common directories completion items where appropriate, ensuring the completion handler's functionality.
Line range hint
1175-1195: Test for incomplete variable assignment is comprehensive.The test accurately verifies proper completion items on incomplete variable assignment, ensuring the completion handler's functionality.
1264-1374: Test for LICENSE variable completion items is comprehensive.The test accurately verifies proper completion items on the LICENSE variable, including operator expectations, ensuring the completion handler's functionality.
server/src/tree-sitter/analyzer.ts (19)
14-15: Imports are correctly added.The new imports are necessary for the functionalities introduced in the file.
Also applies to: 17-17, 23-23, 32-33
40-45: New properties inAnalyzedDocumentare appropriate.The added properties are essential for handling Bash and Python symbols and trees.
59-60: New properties inAnalyzerclass are appropriate.The added properties are necessary for managing parsers and storing recipe local files.
Also applies to: 63-63
77-87: Methods for managing recipe local files are well-implemented.The methods provide a clear interface for managing recipe local files.
97-107: Methods for retrieving specific symbols are well-implemented.The methods enhance modularity and readability by providing specific access to different types of symbols.
109-117: Method for aggregating all symbols is well-implemented.The method provides a convenient way to access all symbols, improving usability.
123-125: Changes toinitializemethod are appropriate.The method now accepts separate parsers for BitBake and Bash, allowing for more flexible parsing strategies.
135-164: Changes toanalyzemethod are well-implemented.The method now generates and uses both BitBake and Bash trees, enhancing its ability to analyze documents comprehensively.
166-173: Method for generating BitBake tree is well-implemented.The method encapsulates the logic for generating a BitBake tree, improving modularity and readability.
175-187: Method for generating Bash tree is well-implemented.The method encapsulates the logic for generating a Bash tree, improving modularity and readability.
199-289: Method for extracting symbols from BitBake tree is well-structured.The method effectively extracts various types of symbols, and the comments provide clarity on the logic.
291-348: Method for extracting symbols from Bash tree is well-structured.The method effectively extracts Bash symbols, aligning with the overall design of the
Analyzerclass.
373-378: Methods for accessing parsed trees are well-implemented.The methods provide a clear interface for accessing parsed trees, enhancing modularity.
689-695: Renaming of methods improves readability.The methods have been renamed to better reflect their functionality, improving clarity.
Also applies to: 699-705
816-828: Methods for retrieving syntax nodes are well-implemented.The methods encapsulate the logic for retrieving syntax nodes, improving modularity and readability.
Also applies to: 830-841
845-847: Changes to methods for handling include files are well-implemented.The updated signatures and logic improve the handling of include files, aligning with new functionalities.
Also applies to: 854-896
Line range hint
1124-1144: Changes toprocessRecipeScanResultsare well-implemented.The method now processes scan results using the BitBake parser, enhancing its functionality.
Line range hint
1084-1116: Changes toresolveSymbolare well-implemented.The method now resolves symbols with variable expansion syntax, improving its functionality.
Line range hint
1008-1064: Method for extracting modification history is well-implemented.The method effectively extracts modification history from comments, enhancing the ability to track changes.
| python() { | ||
| FOO = 'FOO' | ||
| d.getVar("FOO") | ||
| } |
There was a problem hiding this comment.
Clarify or complete the python function implementation.
The function retrieves the variable FOO using d.getVar("FOO") but does not store or use the result. Consider implementing logic to utilize the retrieved value or clarify the function's purpose.
| python() { | ||
| foo='foo' | ||
| print(foo) | ||
| d.getVar('foo') | ||
| } |
There was a problem hiding this comment.
Clarify or complete the python function implementation.
The function prints the variable foo and retrieves it using d.getVar('foo'), but the purpose of retrieving the variable is unclear. Consider implementing logic to utilize the retrieved value or clarify the function's purpose.
| do_stuff() { | ||
| echo "${foo}" | ||
| local foo='foo' | ||
| echo "$foo" | ||
| } |
There was a problem hiding this comment.
Avoid variable shadowing in the do_stuff function.
The function echoes the variable foo before and after declaring it locally, leading to potential confusion. Consider renaming the local variable to avoid shadowing and clarify the function's behavior.
| python() { | ||
| foo = '' | ||
| print(foo) | ||
| FOO = 'FOO' | ||
| d.getVar("FOO") | ||
| print(FOO) | ||
| } |
There was a problem hiding this comment.
Clarify or complete the python function implementation.
The function retrieves the variable FOO using d.getVar("FOO") and prints it, but the retrieved value is not used. Consider implementing logic to utilize the retrieved value or clarify the function's purpose.
| mv json/licenses.json ../server/resources/spdx-licenses.json | ||
| cd .. | ||
| rm -rf license-list-data |
There was a problem hiding this comment.
Check for file existence before moving.
Add a check to ensure json/licenses.json exists before attempting to move it.
Apply this diff to add a file existence check:
if [ -f json/licenses.json ]; then
mv json/licenses.json ../server/resources/spdx-licenses.json
else
echo "licenses.json not found"; exit 1
fiCommittable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| mv json/licenses.json ../server/resources/spdx-licenses.json | |
| cd .. | |
| rm -rf license-list-data | |
| if [ -f json/licenses.json ]; then | |
| mv json/licenses.json ../server/resources/spdx-licenses.json | |
| else | |
| echo "licenses.json not found"; exit 1 | |
| fi | |
| cd .. | |
| rm -rf license-list-data |
| - uses: actions/download-artifact@v4 | ||
| - run: npx vsce publish --packagePath $(find . -iname yocto-bitbake*.vsix) |
There was a problem hiding this comment.
Quote parameters in shell command to prevent word splitting.
The parameters to find and the result of find should be quoted to prevent word splitting.
- run: npx vsce publish --packagePath "$(find . -iname 'yocto-bitbake*.vsix')"Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - uses: actions/download-artifact@v4 | |
| - run: npx vsce publish --packagePath $(find . -iname yocto-bitbake*.vsix) | |
| - uses: actions/download-artifact@v4 | |
| - run: npx vsce publish --packagePath "$(find . -iname 'yocto-bitbake*.vsix')" |
Tools
actionlint
114-114: shellcheck reported issue in this script: SC2046:warning:1:32: Quote this to prevent word splitting
(shellcheck)
114-114: shellcheck reported issue in this script: SC2061:warning:1:48: Quote the parameter to -iname so the shell won't interpret it
(shellcheck)
| - run: npx ovsx publish $(find . -iname yocto-bitbake*.vsix) -p ${VSX_PAT} | ||
| env: |
There was a problem hiding this comment.
Quote parameters in shell command to prevent word splitting.
The parameters to find and the result of find should be quoted to prevent word splitting.
- run: npx ovsx publish "$(find . -iname 'yocto-bitbake*.vsix')" -p "${VSX_PAT}"Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - run: npx ovsx publish $(find . -iname yocto-bitbake*.vsix) -p ${VSX_PAT} | |
| env: | |
| - run: npx ovsx publish "$(find . -iname 'yocto-bitbake*.vsix')" -p "${VSX_PAT}" | |
| env: |
Tools
actionlint
126-126: shellcheck reported issue in this script: SC2046:warning:1:18: Quote this to prevent word splitting
(shellcheck)
126-126: shellcheck reported issue in this script: SC2061:warning:1:34: Quote the parameter to -iname so the shell won't interpret it
(shellcheck)
126-126: shellcheck reported issue in this script: SC2086:info:1:58: Double quote to prevent globbing and word splitting
(shellcheck)
| connection.onInitialize(async (params: InitializeParams): Promise<InitializeResult> => { | ||
| logger.level = 'none' | ||
| logger.info('[onInitialize] Initializing connection') | ||
|
|
||
| workspaceFolder = params.workspaceFolders?.[0].uri.replace('file://', '') | ||
|
|
||
| pokyFolder = pokyFolder ?? workspaceFolder | ||
|
|
||
| logger.info('[onInitialize] Parsing doc files') | ||
| bitBakeDocScanner.parseDocs() | ||
|
|
||
| const bitBakeParser = await generateBitBakeParser() | ||
| const bashParser = await generateBashParser() | ||
| analyzer.initialize(bitBakeParser, bashParser) | ||
|
|
There was a problem hiding this comment.
Improve error handling in the initialization process.
Consider adding error handling for the asynchronous operations in the initialization process to ensure robustness.
Apply this diff to improve error handling:
connection.onInitialize(async (params: InitializeParams): Promise<InitializeResult> => {
logger.level = 'none'
logger.info('[onInitialize] Initializing connection')
workspaceFolder = params.workspaceFolders?.[0].uri.replace('file://', '')
pokyFolder = pokyFolder ?? workspaceFolder
logger.info('[onInitialize] Parsing doc files')
bitBakeDocScanner.parseDocs()
- const bitBakeParser = await generateBitBakeParser()
- const bashParser = await generateBashParser()
+ let bitBakeParser, bashParser
+ try {
+ bitBakeParser = await generateBitBakeParser()
+ bashParser = await generateBashParser()
+ } catch (error) {
+ logger.error(`Error generating parsers: ${error}`)
+ throw error
+ }
analyzer.initialize(bitBakeParser, bashParser)
return {
capabilities: {Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| connection.onInitialize(async (params: InitializeParams): Promise<InitializeResult> => { | |
| logger.level = 'none' | |
| logger.info('[onInitialize] Initializing connection') | |
| workspaceFolder = params.workspaceFolders?.[0].uri.replace('file://', '') | |
| pokyFolder = pokyFolder ?? workspaceFolder | |
| logger.info('[onInitialize] Parsing doc files') | |
| bitBakeDocScanner.parseDocs() | |
| const bitBakeParser = await generateBitBakeParser() | |
| const bashParser = await generateBashParser() | |
| analyzer.initialize(bitBakeParser, bashParser) | |
| connection.onInitialize(async (params: InitializeParams): Promise<InitializeResult> => { | |
| logger.level = 'none' | |
| logger.info('[onInitialize] Initializing connection') | |
| workspaceFolder = params.workspaceFolders?.[0].uri.replace('file://', '') | |
| pokyFolder = pokyFolder ?? workspaceFolder | |
| logger.info('[onInitialize] Parsing doc files') | |
| bitBakeDocScanner.parseDocs() | |
| let bitBakeParser, bashParser | |
| try { | |
| bitBakeParser = await generateBitBakeParser() | |
| bashParser = await generateBashParser() | |
| } catch (error) { | |
| logger.error(`Error generating parsers: ${error}`) | |
| throw error | |
| } | |
| analyzer.initialize(bitBakeParser, bashParser) | |
| return { | |
| capabilities: { |
| documents.onDidChangeContent(async (event) => { | ||
| await analyzeDocument(event) | ||
|
|
||
| if (analyzer.getRecipeLocalFiles(event.document.uri) === undefined) { | ||
| try { | ||
| const recipeLocalFiles = await connection.sendRequest<RequestResult['getRecipeLocalFiles']>(RequestMethod.getRecipeLocalFiles, { uri: event.document.uri.replace('file://', '') }) | ||
| analyzer.setRecipeLocalFiles(event.document.uri, recipeLocalFiles) | ||
| } catch (error) { | ||
| // When using the language server without the client, custom requests are not supported | ||
| // The CoC.nvim client will disable the server if an exception is thrown | ||
| logger.error(`Error while getting recipe local files: ${error as any}`) | ||
| } | ||
| } |
There was a problem hiding this comment.
Improve error handling for custom requests.
Consider adding more specific error handling for custom requests to prevent the server from being disabled.
Apply this diff to improve error handling:
documents.onDidChangeContent(async (event) => {
await analyzeDocument(event)
if (analyzer.getRecipeLocalFiles(event.document.uri) === undefined) {
try {
const recipeLocalFiles = await connection.sendRequest<RequestResult['getRecipeLocalFiles']>(RequestMethod.getRecipeLocalFiles, { uri: event.document.uri.replace('file://', '') })
analyzer.setRecipeLocalFiles(event.document.uri, recipeLocalFiles)
} catch (error) {
// When using the language server without the client, custom requests are not supported
// The CoC.nvim client will disable the server if an exception is thrown
- logger.error(`Error while getting recipe local files: ${error as any}`)
+ logger.warn(`Custom request failed: ${error as any}`)
+ // Handle specific errors if needed
}
}
})Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| documents.onDidChangeContent(async (event) => { | |
| await analyzeDocument(event) | |
| if (analyzer.getRecipeLocalFiles(event.document.uri) === undefined) { | |
| try { | |
| const recipeLocalFiles = await connection.sendRequest<RequestResult['getRecipeLocalFiles']>(RequestMethod.getRecipeLocalFiles, { uri: event.document.uri.replace('file://', '') }) | |
| analyzer.setRecipeLocalFiles(event.document.uri, recipeLocalFiles) | |
| } catch (error) { | |
| // When using the language server without the client, custom requests are not supported | |
| // The CoC.nvim client will disable the server if an exception is thrown | |
| logger.error(`Error while getting recipe local files: ${error as any}`) | |
| } | |
| } | |
| documents.onDidChangeContent(async (event) => { | |
| await analyzeDocument(event) | |
| if (analyzer.getRecipeLocalFiles(event.document.uri) === undefined) { | |
| try { | |
| const recipeLocalFiles = await connection.sendRequest<RequestResult['getRecipeLocalFiles']>(RequestMethod.getRecipeLocalFiles, { uri: event.document.uri.replace('file://', '') }) | |
| analyzer.setRecipeLocalFiles(event.document.uri, recipeLocalFiles) | |
| } catch (error) { | |
| // When using the language server without the client, custom requests are not supported | |
| // The CoC.nvim client will disable the server if an exception is thrown | |
| logger.warn(`Custom request failed: ${error as any}`) | |
| // Handle specific errors if needed | |
| } | |
| } |
| if ((this.bitbakeSettings.workingDirectory != null) && !fs.existsSync(this.bitbakeSettings.workingDirectory)) { | ||
| // If it is not defined, then we will use the workspace folder which is always valid | ||
| clientNotificationManager.showBitbakeSettingsError('Working directory does not exist.') | ||
| return false | ||
| } |
There was a problem hiding this comment.
Improve error handling for working directory validation.
Consider adding more specific error handling for working directory validation to provide better feedback to the user.
Apply this diff to improve error handling:
if ((this.bitbakeSettings.workingDirectory != null) && !fs.existsSync(this.bitbakeSettings.workingDirectory)) {
// If it is not defined, then we will use the workspace folder which is always valid
clientNotificationManager.showBitbakeSettingsError('Working directory does not exist.')
return false
}
+ else if (this.bitbakeSettings.workingDirectory == null) {
+ logger.warn('Working directory is not defined. Using workspace folder as default.')
+ }Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| if ((this.bitbakeSettings.workingDirectory != null) && !fs.existsSync(this.bitbakeSettings.workingDirectory)) { | |
| // If it is not defined, then we will use the workspace folder which is always valid | |
| clientNotificationManager.showBitbakeSettingsError('Working directory does not exist.') | |
| return false | |
| } | |
| if ((this.bitbakeSettings.workingDirectory != null) && !fs.existsSync(this.bitbakeSettings.workingDirectory)) { | |
| // If it is not defined, then we will use the workspace folder which is always valid | |
| clientNotificationManager.showBitbakeSettingsError('Working directory does not exist.') | |
| return false | |
| } | |
| else if (this.bitbakeSettings.workingDirectory == null) { | |
| logger.warn('Working directory is not defined. Using workspace folder as default.') | |
| } |
This command is responsible for executing bitbake command `bitbake -e` and sending the output to the server for further processing in order to provide necessary language features such as hover definition for conf files. This commit only handles the command execution and the rest will be done in the following commits.
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>
Add hover documentation verbatim for all operators and override style operators '=', '?=', '??=', ':=', '+=', '=+', '.=', '=.', ':append', ':prepend', and ':remove'. Assisted-by: OpenCode:big-pickle
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 : )