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

Scan per build config #373

Merged

Conversation

deribaucourt
Copy link
Member

Closes #359

@deribaucourt
Copy link
Member Author

deribaucourt commented Jan 7, 2025

Showcasing the new dynamic scan environment:
image
@LiveFreeAndRoam
Well, this was supposed to be a gif, but Github doesn't support it.

@deribaucourt deribaucourt force-pushed the scan-per-build-config branch from d29670f to 1e34947 Compare January 8, 2025 08:55
package.json Show resolved Hide resolved
client/src/ui/BitbakeRecipesView.ts Outdated Show resolved Hide resolved
@LiveFreeAndRoam
Copy link

Showcasing the new dynamic scan environment

I'm looking forward to trying it out when it becomes available.

Many thanks!

This change replaces the busy waiting in BitbakeRecipesView with a
promise that resolves when the scan is complete.
The next changes will allow storing different scanResult per
buildConfiguration. Therefore, the scanResult property will be
renamed to activeScanResult to reflect that association. There no longer
is one Project scan.

Recipe scan are not affected since they are temporary and manually
triggered.
Managing the client directly from the project scanner is overkill.
Instead, we can use an event emitter to notify the client about the scan
result.
Fix the typo. Also, there's no need for it to be readonly, we modify
the members.
Allow storing multiple project scan for each buildConfiguration.
This will provide hot-swapping and improved accuracy without needing
to manually re-scan every time another buildConfiguration is selected.
Follow the data structure update from the previous commits which now
allow to store scan results per active build configuration.

The responsibility for managing the memento is moved to the
BitBakeProjectScanner class.
Now that we can store individual scan results per buildConfiguration,
add the logic to trigger re-scans or UI updates when swapping.

Note that we don't invalidate the previous scan while doing the new one.
This allows the user to still navigate the recipes view, even though it
is no longer accurate for a few seconds. The scan is made visible in the
bottom right status bar.
The views were not updated if there was a configuration change while
a scan was already available.
As requested by a GitHub user. Now that the view is refreshed based on
the selected configuration, it will make it more obvious which config
is currently active. Note that it is also displayed in the bottom right
status bar.

If a re-scan is required, the title will be updated before the recipes
are displayed. This could be a bit misleading during the first config
swap.
If the workspace state was cleared, the extension would not
automatically re-scan next time it was activated.
Previously, the view would always display the previous scan result. This
could be misleading when a new scan was started, especially through a
buildConfiguration change. The bottom left status bar was loading, but
the recipe panel was missing an indication.
In addition to the bottom right selector, make it available through
the view's menu and context menus. The active config is now displayed
on the view's title, so it's better to have a selector in that UI area.
It could be useful to troubleshoot future errors linked to this event.
@deribaucourt deribaucourt merged commit 5f630b7 into yoctoproject:staging Jan 10, 2025
5 checks passed
@deribaucourt deribaucourt deleted the scan-per-build-config branch January 10, 2025 16:04
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.

Handle varying buildConfigurations in the Recipes Explorer
3 participants