fix(cli): repair a merge splice that left commands.py unparseable - #100
Closed
Kartikey1306 wants to merge 1 commit into
Closed
fix(cli): repair a merge splice that left commands.py unparseable#100Kartikey1306 wants to merge 1 commit into
Kartikey1306 wants to merge 1 commit into
Conversation
master does not parse. `ebuild` cannot start and pytest collects nothing:
$ python -c "import ebuild.cli.commands"
File "ebuild/cli/commands.py", line 855
"""ebuild — A unified embedded OS build system."""
^
SyntaxError: invalid character '—' (U+2014)
Line 855 is a normal docstring. The real damage is 300 lines earlier:
_board_config() lost its body and its closing quotes to a copy of
_resolve_backend_request()'s last line, spliced in during a conflict
resolution:
def _board_config() -> Optional[Dict[str, Any]]:
"""The project's own board description, if it ships one.
return resolved_backend, backend_config
Its docstring never closes, so every subsequent triple-quote toggles the
wrong way and the first em-dash the tokenizer reaches outside a string is
reported instead -- at line 855, in a function that is fine.
_resolve_backend_request itself still has its own return, so the line is
a duplicate rather than a move.
Restores the body from f5209ac, the last commit where this file parsed.
The same resolution also dropped the whole of embeddedos-org#89 -- _NO_TESTS_MARKERS,
_TEST_COUNT_PATTERNS, _ran_no_tests, _parse_test_counts and both call
sites -- leaving its tests behind and `test` back on:
log.success("All tests passed.")
reached unconditionally on a zero exit. ctest exits 0 when it finds
nothing to run, so a project with enable_testing() and no add_test()
reported a pass having executed nothing. Restored from the same commit.
Collection goes from "cannot import" to 474 passing. The 51 that fail are
pre-existing and were invisible while the module would not parse; they
are not all one cause and are listed in the PR description.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Kartikey1306
force-pushed
the
fix/board-config-merge-splice
branch
from
September 1, 2026 11:30
54dcbac to
662aecf
Compare
Contributor
Author
Contributor
Author
|
Closing in favour of #102, which contains this commit ( This PR cannot go green on its own, and that is a property of the stack rather than of the change.
Each step is a strict improvement, but branch protection needs a green head, and the remaining failures are only cleared by the last three commits. Giving this PR enough to pass would just reproduce #102. Nothing here is lost — #102 carries this commit unchanged, and is green on all 9 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
master does not parse
ebuildcannot start, and pytest collects nothing:All 9
Testjobs on master fail this way, on every OS and Python version.Line 855 is not the problem
It is an ordinary docstring. The damage is 300 lines earlier —
_board_config()lost its body and its closing quotes to a copy of_resolve_backend_request()'s last line, spliced in during a conflict resolution:Its docstring never closes, so from there on every triple-quote toggles the wrong way, and the first em-dash the tokenizer reaches outside a string gets reported — at line 855, inside a function that is perfectly fine.
_resolve_backend_requeststill has its ownreturnat line 364, so that line is a stray duplicate, not a move.Introduced by
6d2c149, a "Merge branch 'master' into …" commit, and carried to master througha9e3c60and562d28d.The same resolution dropped #89 entirely
_NO_TESTS_MARKERS,_TEST_COUNT_PATTERNS,_ran_no_tests,_parse_test_countsand both call sites are gone — the tests were left behind.testis back to:reached unconditionally on a zero exit. ctest exits 0 when it finds nothing to run, so a project with
enable_testing()and noadd_test()reports a pass having executed nothing — exactly what #89 fixed.This PR
Restores both from
f5209ac, the last commit where this file parsed. Verbatim; no new design.import ebuild.cli.commandsStill failing: 51
Pre-existing, and invisible until the module parses again. Not one cause — the largest groups:
NameError: name '_ninja_path' is not defined. The function was renamedescape_ninja_pathinninja_backend.pyand the tests were not updated (same shape as theversion_key→version_sort_keyrename in fix(packages): a patch respin no longer sorts below the release it supersedes #98). Happy to take this in a follow-up.dispatcher.configure(...) ran, but build.yaml declares targets— the declared-targets precedence guard is not in effect.--build-dirresolution.test_dispatch.doctor,package, footprint and config validation.🤖 Generated with Claude Code