Skip to content

feat(cli): refuse packages that cannot resolve, and summarise what the build contained - #74

Merged
srpatcha merged 2 commits into
masterfrom
feat/add-refuses-and-build-summary
Sep 1, 2026
Merged

feat(cli): refuse packages that cannot resolve, and summarise what the build contained#74
srpatcha merged 2 commits into
masterfrom
feat/add-refuses-and-build-summary

Conversation

@srpatcha

Copy link
Copy Markdown
Member

Two gaps against the MLP developer walk, which runs ebuild add wifi and then expects a build that says what it contained.

ebuild add added packages it knew could not resolve

$ ebuild add wifi
[warn] No recipe found for 'wifi' — adding anyway.
[ok] Added wifi to build.yaml

That trades one clear error now for a confusing one at build time, in a file the developer has since committed. It now refuses, and says what would help:

$ ebuild add wifi
[error] No recipe for 'wifi'.
  Available: freertos, littlefs, lwip, mbedtls, zlib
  To add it anyway: ebuild add wifi --force

$ ebuild add lwipp
[error] No recipe for 'lwipp'.
  Did you mean: lwip?

--force keeps the old behaviour for anyone who genuinely wants an entry ahead of its recipe, and says plainly that it will not resolve. Refusing with no escape hatch would be the other kind of unhelpful.

This is not hypothetical — a forced wifi entry fails the build like this:

[error] Package error: Package 'wifi' not found in registry.
        Available: ['freertos', 'littlefs', 'lwip', 'mbedtls', 'zlib']

Same information, one step later, after it is in a committed file.

A successful build did not say what was in it

EmbeddedOS Build
  OK   toolchain            arm-none-eabi-gcc
  OK   board configuration  stm32f4
  OK   lwip
  MISS mqtt                 declared, nothing resolved
  OK   temperature-monitor  executable

MISS is the case worth having. A package that resolved to no include or library directory contributed nothing, whatever build.yaml says. The build still succeeds, the feature is simply absent, and until now nothing said so.

Verification

pytest: 271 passed, 16 new. The summary tests render through the real logger, so they assert on what a developer sees rather than on an intermediate structure. Walked add by hand for all three paths — known package, typo, unknown with and without --force.

Stacks on #72#71#70. master cannot currently run its own suite.

🤖 Generated with Claude Code

Comment thread ebuild/system/doctor.py Fixed
Comment thread tests/unit/test_doctor.py Fixed
Comment thread tests/unit/test_doctor.py Fixed
Comment thread tests/unit/test_footprint.py Fixed
Comment thread ebuild/system/doctor.py Fixed
…e build contained

Two gaps against the MLP developer walk, which runs `ebuild add wifi` and then
expects a build that says what it contained.

`ebuild add` warned about an unknown package and added it anyway:

    $ ebuild add wifi
    [warn] No recipe found for 'wifi' — adding anyway.
    [ok] Added wifi to build.yaml

That trades one clear error now for a confusing one at build time, in a file
the developer has since committed. It now refuses, and says what would help:

    $ ebuild add wifi
    [error] No recipe for 'wifi'.
      Available: freertos, littlefs, lwip, mbedtls, zlib
      To add it anyway: ebuild add wifi --force

    $ ebuild add lwipp
    [error] No recipe for 'lwipp'.
      Did you mean: lwip?

`--force` keeps the old behaviour for anyone who genuinely wants an entry
ahead of its recipe, and says plainly that it will not resolve. Refusing
without an escape hatch would be the other kind of unhelpful.

The build then reports what it actually contained:

    EmbeddedOS Build
      OK   toolchain            arm-none-eabi-gcc
      OK   board configuration  stm32f4
      OK   lwip
      MISS mqtt                 declared, nothing resolved
      OK   temperature-monitor  executable

The case worth having is MISS. A package that resolved to no include or
library directory contributed nothing, whatever build.yaml says -- the build
still succeeds, the feature is simply absent, and until now nothing said so.

The summary is rendered through the logger in the tests, so the assertions
are on what a developer actually sees rather than on an intermediate
structure.

271 tests pass, up from 255; 16 are new here.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@srpatcha
srpatcha merged commit 34f9bff into master Sep 1, 2026
21 of 30 checks passed
@srpatcha
srpatcha deleted the feat/add-refuses-and-build-summary branch September 1, 2026 10:03
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.

1 participant