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

Refactor to a common bitbake lib #41

Merged
merged 11 commits into from
Nov 2, 2023
Merged

Refactor to a common bitbake lib #41

merged 11 commits into from
Nov 2, 2023

Conversation

deribaucourt
Copy link
Member

Use the new and more complete bitbakeDriver from the client in the language server.

@deribaucourt deribaucourt force-pushed the bitbake-lib branch 2 times, most recently from 5d576fe to 12b7cc0 Compare October 30, 2023 16:37
@deribaucourt deribaucourt marked this pull request as ready for review October 31, 2023 11:11
@deribaucourt deribaucourt force-pushed the bitbake-lib branch 4 times, most recently from fd2399a to cc3c0fa Compare October 31, 2023 14:12
Allow the client and server to share common code. In order to comply
with VSCode packaging, the code is compiled both in the server and the
client outputs. A package.json is only provided to install common
dependencies. Unit tests, linting and debugging configurations were
tested and updated to work with the new structure.
This code was produced just to check through the CI that everything
was included properly while providing a usage example.
In order to be able to log from that library, the logger must be within
it. vscode cannot be imported from the language server so we use
dependency inversion to now pass the output channel to the logger.
OutputLogger was moved to the common lib directory, update all
references.
In order to share this between the language client and server, it must
be in the common library. Because vscode cannot be imported in the
server, the settings must be passed in from the client. We use the any
type as this is what's produced by vscode.workspace.getConfiguration in
both the client and server.

Tests and references are also updated.
The server bitbake scanner usually wants to wait for the bitbake
command to finish.
This makes the language server use the same Bitbake implementation as
the client. Common duplicated code is now refactored into a single
library.
The bitbake scanner provides the list of active overrides. It is not
recipe specific to be faster.
Add an integration test that runs bitbake and ensures we properly
parse the result to collect statistics about the project.
The Bitbake scanner would only fail when bitbake succeeded and produced
an output.
@deribaucourt deribaucourt merged commit ead7b5c into staging Nov 2, 2023
1 check passed
@deribaucourt deribaucourt deleted the bitbake-lib branch November 2, 2023 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants