Ported from vscode-bitbake.
Because some APIs of vscode are missing in coc.nvim, disable some features temporarily:
- all commands about terminal: miss
vscode.terminal
- coc-marketplace
- npm
- vim:
" command line
CocInstall coc-bitbake
" or add the following code to your vimrc
let g:coc_global_extensions = ['coc-bitbake', 'other coc-plugins']
For a description of the extension itself, please see the client's README.
It is also possible to use some features of the language server on other editors (Vim, ...). Follow the server's README.
The changelog for the extension can be found here.
Installing from VS Code Extension Marketplace
To install this extension from the VS Code Extension Marketplace, please follow this guide. For more information regarding the Extension Marketplace, please see the official documentation.
Manual installation takes place in two steps. The code must be installed via npm
and subsequently built within Visual Studio Code. Before performing these steps, please ensure you have cloned this repository.
To install the dependencies:
npm install
To compile the typescript files:
npm run compile
To clean up the project (This deletes node_modules):
npm run clean
For more commands, refer to the script
section in the root package.json
.
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.
BitBake and Yocto docs are required for some features to work. They need to be fetched before testing and development:
npm run fetch:docs
Similar for the command that fetches poky, it needs to be run before running the integration tests:
npm run fetch:poky
A wrapper npm script allows running several kinds of tests. To run all tests, use:
npm test
All the tests mentionned are run in our GitHub CI.
One can check coding style using
npm run lint
Install the recommended extensions to automatically fix linting errors when possible.
Unit tests are powered by Jest. They allow mocking the behavior of VSCode and other external libraries. They can individually be run with:
npm run jest
Unit tests are defined in the __tests__
folders.
If you have installed the recommended extensions, you'll find launch and debug tasks for the unit tests in the debug section of VSCode.
See the individual grammar tests README.
These tests allow running the BitBake extension in a live VSCode environment. See the individual integration tests README.
This extension uses tree-sitter to parse the documents. The .wasm
file used for creating the parser is generated from latest release at here.
For more information about the tree-sitter and its CLI, Check out the offical site and npm page
Publishing is automated via GitHub Actions and reserved to project maintainers. To publish a new version:
- Update all the
package.json
files with the new version numberX.Y.Z
. - Document new changes in the
client/CHANGELOG.md
file. - Make sure the
VSCE_PAT
secret is valid in the GitHub repository settings. - Make sure the
NODE_AUTH_TOKEN
secret is valid in the GitHub repository settings. - Update the main branch with the latest staging branch.
- Create a new release on GitHub with a tag in the format
vX.Y.Z
. - Admin approval is required to run the GitHub Action.
The release will be published to the VS Code Marketplace automatically by the GitHub Action. Admin approval is required to run the GitHub Action, and the VSCE_PAT
must be updated to match a valid token for the yocto-project
Azure DevOps publisher. See:
- https://code.visualstudio.com/api/working-with-extensions/publishing-extension
- https://code.visualstudio.com/api/working-with-extensions/continuous-integration
The
NODE_AUTH_TOKEN
secret is used to push the language server package to the npm registry. The token must be linked to account with push permission on: - https://www.npmjs.com/package/language-server-bitbake
Development of this extension happens on GitHub. Issues and pull requests are welcome.
- Syntax derived from https://github.com/mholo65/vscode-bitbake, which is licensed under the MIT License.