Skip to content

fix(scanner): prefer non-skipped recipe entries#518

Merged
deribaucourt merged 1 commit into
yoctoproject:stagingfrom
gcomneno:contrib/issue-494-prefer-active-recipe
May 22, 2026
Merged

fix(scanner): prefer non-skipped recipe entries#518
deribaucourt merged 1 commit into
yoctoproject:stagingfrom
gcomneno:contrib/issue-494-prefer-active-recipe

Conversation

@gcomneno
Copy link
Copy Markdown
Contributor

Fixes #494.

bitbake-layers show-recipes can list multiple versions for the same recipe, including skipped entries. The previous parser captured the last repeated entry, so a later skipped version could mark the whole recipe as skipped.

This changes recipe parsing to select the first non-skipped entry for a recipe, falling back to the first entry when all versions are skipped.

Validation:

  • npm run compile
  • npm run jest -- client/src/__tests__/unit-tests/driver/recipe-parser.test.ts

Copy link
Copy Markdown
Member

@deribaucourt deribaucourt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again for addressing these issues, this is very helpful!
The parsing is mostly in place, but I had some remarks.

Comment thread client/src/__tests__/unit-tests/driver/recipe-parser.test.ts Outdated
Comment thread client/src/__tests__/unit-tests/driver/scanner-unit.test.ts
Comment thread client/src/__tests__/unit-tests/driver/scanner-unit.test.ts
Comment thread client/src/driver/BitBakeProjectScanner.ts
@gcomneno gcomneno force-pushed the contrib/issue-494-prefer-active-recipe branch from 7064c33 to aa9377a Compare May 21, 2026 13:39
@gcomneno
Copy link
Copy Markdown
Contributor Author

I addressed the review comments:

  • renamed the unit test file to scanner-unit.test.ts
  • renamed the test suite accordingly
  • removed the extra empty line in the recipe output fixture
  • kept all recipe entries returned by bitbake-layers show-recipes
  • reordered entries so a non-skipped/buildable entry appears first when available
  • preserved the recipe-wide skipped indicator only when no buildable entry exists

Local validation:

  • npm run compile
  • npm run lint
  • npm run jest -- client/src/tests/unit-tests/driver/scanner-unit.test.ts

@deribaucourt deribaucourt merged commit 1e02f59 into yoctoproject:staging May 22, 2026
5 checks passed
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.

One incompatible recipe file marks whole recipe as incompatible

2 participants