Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doc update #65

Merged
merged 8 commits into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

[![vscode-bitbake CI/CD](https://github.com/savoirfairelinux/vscode-bitbake/actions/workflows/main.yml/badge.svg?branch=master)](https://github.com/savoirfairelinux/vscode-bitbake/actions/workflows/main.yml?query=branch%3Amaster)

This Visual Studio Code plugin is based on [Example - Language Server](https://code.visualstudio.com/docs/extensions/example-language-server).
**For a description of the extension itself, please see [the client's README](./client/README.md)**.

For a description of the extension itself, please see [the client's README](./client/README.md). The changelog for the extension may be found [here](./client/CHANGELOG.md).
The changelog for the extension may be found [here](./client/CHANGELOG.md).

## Installing from [VS Code Extension Marketplace](https://marketplace.visualstudio.com/VSCode)

Expand Down Expand Up @@ -77,5 +77,9 @@ This extension uses tree-sitter to parse the documents. The `.wasm` file used fo

## Contributing

Development of this extension happens on [GitHub](https://github.com/savoirfairelinux/vscode-bitbake).
Development of this extension happens on [GitHub](https://github.com/yoctoproject/vscode-bitbake).
Issues and pull requests are welcome.

## Acknowledgements

* 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).
19 changes: 17 additions & 2 deletions client/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# 2.0.0 - 2023.11.17
- Fixed highlighting errors
- Added more diagnostics to the Problems view
- Added documentation on hover for Yocto variables, flags and functions
- Added embedded languages features for python and shell scripts
- Improved syntax highlighting
- Code completion
- Hover documentation
- Added code completion for Yocto variables, keywords, overrides, classes, functions, include files
- Added BitBake build tasks
- Added BitBake build commands
- Added a BitBake parsing status bar
- Added a BitBake tree view for navigating and building recipes
- Check BitBake settings sanity and prompt the user

# 1.1.2 - 2019.03.13
fixed deployment problems

Expand All @@ -16,15 +31,15 @@ Security updates of dependent packages
# 1.0.2 - 2018.04.11

## Fixed Bugs:
[issue 23](https://github.com/EugenWiens/vscode-bitbake/issues/23) moved `executeBitBakeCmd.sh` script to the working folder. e.g. `vscode-bitbake-build` if the setting for the working path is not changed
[issue 23](https://github.com/EugenWiens/vscode-bitbake/issues/23) moved `executeBitBakeCmd.sh` script to the working folder. e.g. `vscode-bitbake-build` if the setting for the working path is not changed

# 1.0.1 - 2018.03.06
fixed typo in changelog for the [issue 19](https://github.com/EugenWiens/vscode-bitbake/issues/19)

# 1.0.0 - 2018.03.06

## Enhancements:
- [issue 19](https://github.com/EugenWiens/vscode-bitbake/issues/19) Add diagnostic messages on parsing errors
- [issue 19](https://github.com/EugenWiens/vscode-bitbake/issues/19) Add diagnostic messages on parsing errors

# 0.0.13 - 2018.02.10

Expand Down
83 changes: 69 additions & 14 deletions client/README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,30 @@
# BitBake recipe language support in Visual Studio Code

## Setup the extension
In order to work properly, the extension needs to know your Bitbake's location and build folder. It will make the following assumptions:
- Bitbake's folder is located in `sources/poky/bitbake`, relative to the root of the project.
- Your build folder is located at the root of the project in a folder named `build`
## Configuration

Ideally, the path to an environment script to configure the BitBake project should also be specified. If it is not specified, the extension will try to configure the environment variables by itself.
Some advanced features of this extension will need to locate and run BitBake. It can be configured from VSCode's settings.

These can be configured into the VS Code's settings. More options are available.
To access the settings, you can navigate to **Files -> Preferences -> Settings** (or use the shortcut [**Ctrl+,**]). BitBake's settings are under **Extensions**. More options are available to tweak the extension's behavior.

To access the settings, you can navigate to **Files -> Preferences -> Settings** (or use the shortcut [**Ctrl+,**]). BitBake's settings are under **Extensions**
Here's an example `settings.json` reflecting the default values:
```json
{
"bitbake.pathToBuildFolder": "${workspaceFolder}/build",
"bitbake.pathToEnvScript": "${workspaceFolder}/sources/poky/oe-init-build-env",
"bitbake.pathToBitbakeFolder": "${workspaceFolder}/sources/poky/bitbake",
}
```

## Features

### Syntax highlighting

Acknowledgements:
The extension provides syntax highlighting for BitBake recipes, classes, configuration and inc-files. Syntax highlighting also supports embedded languages inside bitbake recipes including inline Python variable expansion, shell code and Python code.

* 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).
The BitBake language is automatically detected based on the file extension:
[`.bb`, `.bbappend`, `.bbclass`]. [`.conf`, `.inc`] are also supported but may be used by other tools.

![Syntax Hilighting](doc/highlighting.png)

### Context-based suggestions

Expand Down Expand Up @@ -47,9 +54,57 @@ The go to definition feature currently behaves as follows:

Place your cursor over a variable. If it is a BitBake defined variable, then its definition from the documentation will be displayed.

### Bitbake commands
### BitBake tasks

BitBake build tasks may be defined through the `tasks.json` file. They allow to build or a run any specific BitBake command on a set of recipes. This feature requires to have properly [configured the extension](#setup-the-extension). Learn how to use VSCode tasks [on the official Visual Studio Code documentation](https://code.visualstudio.com/docs/editor/tasks).

Here's an example `tasks.json` configuration:
```json
{
"tasks": [
{
"label": "Build core-image-minimal",
"type": "bitbake",
"recipes": [
"core-image-minimal"
]
}
]
}
```

### BitBake commands

The extension provides commands and shortcuts to run BitBake tasks. These commands are available in the command palette (`CTRL+SHIFT+P`) and in the editor's contextual menu.

![Contextual menu](doc/contextual-menu.png)

### BitBake recipes view

The extension provides a view to display the list of recipes in the current workspace. This view is available in the left panel. You can quickly navigate to a recipe's source or build it by clicking on it.

![Recipe tree view](doc/recipe-view.png)

### Problems matcher

By default, this extension will run BitBake in parse only mode in the background on file saves to identify syntax errors. They will be displayed in the problems panel. You can disable this feature through the extension's settings.

![Problem matcher](doc/problems.png)

### BitBake status bar

Bitbake parsing status is displayed in the status bar at the bottom of the screen. It will show wether the last BitBake run was successful or not. The bitbake server queues all BitBake commands and runs them sequentially. The status bar will show you if the extension is currently trying to access the bitbake server.

![Status bar](doc/status-bar.gif)

## Contributing

### Reporting issues

User feedback is very welcome on this [extension's repository](https://github.com/yoctoproject/vscode-bitbake). Please report any issues or feature requests you may have with a detailed description of the problem and the steps to reproduce it.

### Contributing code

Contributions are welcome! Please submit your contributions as pull requests on this [extension's repository](https://github.com/yoctoproject/vscode-bitbake)

The extension provides commands and shortcuts to run bitbake tasks. These commands are available in the command palette (CTRL+SHIFT+P) and in the editor's context menu. Before using these commands, you must provide the following settings:
- Build folder
- Path to an environment script to configure the BitBake project (optional)
See the section on [setting up the extension](#setup-the-extension) for more information.
Instructions to build, test and debug the extension are available in the [root README](../README.md).
Binary file added client/doc/contextual-menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/doc/highlighting.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/doc/problems.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/doc/recipe-view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/doc/status-bar.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading