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

Problems refactor #53

Merged
merged 11 commits into from
Nov 8, 2023
Merged

Problems refactor #53

merged 11 commits into from
Nov 8, 2023

Conversation

deribaucourt
Copy link
Member

@deribaucourt deribaucourt commented Nov 6, 2023

Problems where duplicated between language server parsing and client build commands. They are now no longer duplicated and share the same implementation.

More exports will be added to this file in the next commits.
This commit adds a task to run bitbake in parse only mode.
It can be triggered from the command prompt.
In the next commits, the server code that replicates this will be
refactored into using this task as well. It provides a more complete
diagnosis problem matching.
The language server had a duplicated implementation of the parse task
and problems matching. Through a request, use the one from the client.

Launching the task returns the child execution, but not
the command output, so we don't have access to the return value anymore.
This doesn't cause any errors and actually allows to scan the project
even if some recipes are broken. We now will keep access to the list of
recipes and overrides in those cases.
This layer can be used to induce parsing errors during integration
tests.
Parsing is no more done at the server level but through a command.
Update the tests to reflect this change.
The diagnostics are asynchronously updated, so we need to wait for them
to be updated before checking them.
Tasks are copied to temporary script so we don't have the original line
numbers. Still, it's useful to report the error to the problems view.
If the user doesn't want/cannot configure bitbake to be run, it will
be annoying to get errors on every save.
If the bitbake settings are obviously wrong, don't try to parse and
generate more errors. A notification will already be issued.
This allows detecting the ParseErrors originating in layer.conf files.
@deribaucourt deribaucourt merged commit 65789f2 into staging Nov 8, 2023
3 checks passed
@deribaucourt deribaucourt deleted the problems-refactor branch November 8, 2023 08:40
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.

2 participants