Skip to content

fix(cli): restore implementation hunks dropped by merge resolutions - #97

Merged
srpatcha merged 1 commit into
embeddedos-org:masterfrom
Kartikey1306:fix/master-suite-cannot-collect
Sep 1, 2026
Merged

fix(cli): restore implementation hunks dropped by merge resolutions#97
srpatcha merged 1 commit into
embeddedos-org:masterfrom
Kartikey1306:fix/master-suite-cannot-collect

Conversation

@Kartikey1306

Copy link
Copy Markdown
Contributor

master is broken right now

ebuild does not start, and the test suite runs zero tests:

$ python -c "import ebuild.cli.commands"
NameError: name 're' is not defined
$ python -m pytest tests/ -q
!!!! Interrupted: 9 errors during collection !!!!

Why

Four PRs landed their tests while their implementation was discarded during conflict resolution. The merges that did it were never gated by a run — f5209ac, the current master head, has no CI runs at all.

PR merge landed dropped
#64 6a22e36 test_golden_path_commands.py _workspace_repo_paths, _cached_repo_libraries, _record_board_selection, _EOS_PROJECT_CONFIG, configure --board
#89 32348f0 five re. uses import re
#90 d3958f7 the initramfs assertions _newc_members helper, os / stat imports
#92 version_keyversion_sort_key rename the caller in the tests

Verifiable per-symbol — for #64, present on the branch, absent on the merge result:

$ git show 6a22e36^2:ebuild/cli/commands.py | grep -c _workspace_repo_paths   # 1
$ git show origin/master:ebuild/cli/commands.py | grep -c _workspace_repo_paths  # 0

Two user-visible regressions this restores

  • package_paths lost its {**_workspace_repo_paths(), **_install_packages(...)} merge, so a scaffolded project that uses eos or eboot gets no include or link paths from ~/.ebuild/repos — back to fatal error: eos/hal.h: No such file or directory, the exact bug fix(mvp): repair the first-run developer path #64 fixed.
  • configure lost --board entirely, so the documented golden path (configure --board stm32f4 then a bare build) fails with no such option: --board.

What this PR does

Restores those hunks verbatim from the branches that were merged — no new design. Every restored function keeps its original docstring.

Result

before after
collection 9 errors, 0 tests run clean
passing 0 446

Still failing (pre-existing, out of scope)

  • 7doctor (feat(cli): add ebuild doctor — one-command environment diagnosis #72) and package (feat(cli): add ebuild package — assemble the eFirmware .efw image #77) are two more features whose implementations the same merges dropped; they are 400+ line features and should be restored by their authors rather than re-landed here. Neither command is registered on master today.
  • 2_shared_flag / -dynamiclib on macOS.
  • 1test_measures_a_real_binary (assert 0 >= 4096).
  • 1version_sort_key("1.2.11") < version_sort_key("1.2.11b") is inverted: _component_key("11b") returns (0, 0, '11b'), which sorts below (1, 11, ''). OpenSSL-style letter suffixes should sort above their base.
  • 1REPOS points at default branch main, but embeddedos-org/eos has no main; ebuild setup fails for every new developer.

Happy to take the last two in follow-ups.

🤖 Generated with Claude Code

`import ebuild.cli.commands` raises NameError on master, so the `ebuild`
command does not start and pytest cannot collect nine test modules --
the suite reports "9 errors during collection" and runs zero tests.

Four PRs landed their tests while their implementation was discarded
during conflict resolution, and the merges that did it were not gated by
a run: f5209ac, current master, has no CI runs at all.

  embeddedos-org#64 (6a22e36)  tests/unit/test_golden_path_commands.py landed;
                 _workspace_repo_paths, _cached_repo_libraries,
                 _record_board_selection, _EOS_PROJECT_CONFIG and the
                 `configure --board` option did not.
  embeddedos-org#89 (32348f0)  commands.py gained five `re.` uses, no `import re`.
  embeddedos-org#90 (d3958f7)  the initramfs test kept its assertions but lost its
                 `_newc_members` helper and its `os` / `stat` imports.
  embeddedos-org#92            registry.version_key was renamed version_sort_key
                 without updating its caller in the tests.

Restoring them, taken verbatim from the branches that were merged:

* commands.py: `import re`; `_workspace_repo_paths`,
  `_cached_repo_libraries`, `_record_board_selection`,
  `_EOS_PROJECT_CONFIG`; the `--board` option on `configure` and the
  call that persists it; and the `{**_workspace_repo_paths(), **...}`
  merge at both `_install_packages` call sites.

  Without that last hunk a scaffolded project that `use`s eos or eboot
  gets no include or link paths from ~/.ebuild/repos, which is the
  "fatal error: eos/hal.h: No such file or directory" that embeddedos-org#64 fixed.
  Without the option, the documented golden path -- `configure --board`
  then a bare `build` -- fails with "no such option: --board".

* the initramfs test: `os` / `stat` imports and the `_newc_members`
  newc parser the assertions call.

* test_package_registry.py: import the name the module now exports.

Collection goes from 9 errors / 0 tests to 446 passing. The 12 that
still fail are pre-existing and out of scope here: `doctor` (embeddedos-org#72) and
`package` (embeddedos-org#77) are two more features whose implementations the same
merges dropped and which should be restored by their authors, and the
rest are separate bugs -- see the PR description.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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