Repository navigation
Description
ebuild/build/dispatch.py on master does not parse. The package cannot be
imported, so no ebuild command runs at all.
$ git show origin/master:ebuild/build/dispatch.py > /tmp/d.py
$ python3 -c "import ast; ast.parse(open('/tmp/d.py').read())"
File "dispatch.py", line 133
else:
^^^^
SyntaxError: invalid syntax
The line:
128 raise ValueError(
129 f"Unknown build backend '{backend}'. "
130 f"Supported backends: {', '.join(sorted(ALL_BACKENDS))}"
131 )
132
133 else: <-- no `if` to attach to
134 raise RuntimeError(
135 f"BackendDispatcher cannot configure backend '{backend}'. "An else: with nothing to bind to, immediately after a completed raise.
Cause
Two different designs for the unknown-backend error path — one raising
ValueError, one raising RuntimeError — were each green on their own branch
and squash-merged onto a base that had moved. The merge kept the first raise and
the second's else:, producing a file that no version of the code ever looked
like. Nothing recompiled the result before it became master.
Identical in shape to eos#92, where sync.c ended up referencing original_prio
from one priority-inheritance design and g_blocked_on from another. Same root
cause, different repository.
Impact
Total. dispatch.py is imported by the CLI, so ebuild build, ebuild configure, ebuild info — every command — fails at import. The suite reports
11 failures / 190 passed on master once the file is made parseable by hand;
until then it does not collect.
Why nothing caught it
$ gh api repos/embeddedos-org/ebuild/branches/master/protection
{"checks": null, "reviews": 1, "sigs": false}
required_status_checks is null. Nothing builds or imports the merge result
before it lands. This is the third repository in the organisation with the same
gap — none has a required status check — and the second where it has already
allowed a non-compiling master.
Fixes already open
| PR | parses after? |
|---|---|
| #66 | yes — also unifies the two error paths behind one _unknown_backend() helper. Already approved. |
| #78 | yes |
| #75 | no — despite the title. Its dispatch.py still fails at line 133 with the identical error. Its toolchain-flag validation is real and worth keeping, but it does not repair the syntax. |
#66 is the one to take: it removes the duplication that caused this rather than
just deleting the stray else:.
The durable fix
Once #66 lands, make the existing workflow a required status check on master.
A PR whose merge result does not import then cannot merge, which is precisely
what did not happen here.
Activity
srpatcha commentedon Aug 31, 2026
masterparses again and the suite runs. Verified from a freshgit clone --depth 1:The orphan
else:is gone.Leaving this open for the same reason as eos#92: the syntax error was the
symptom, and the cause is still in place.
required_status_checksisnull. Nothing imports the package before the mergelands, which is how a file that does not parse became
masterin the firstplace — every command in the CLI broken, and no gate that would notice.
A required check that does no more than
python -c "import ebuild.build.dispatch"would have caught this exact failure. The suite already runs in CI; making it
required is a settings change, not work.
Worth doing now while the build is green rather than after the next splice.
ci: add one job branch protection can require
ci: make the gate's coverage checkable, not just its wiring
ci: make the gate's coverage checkable, not just its wiring
ci: add one job branch protection can require (#103)
ci: give each matrix leg its own check name (#104)
Aswin-V commentedon Oct 1, 2026
Verified at master cc86aff: ebuild/build/dispatch.py parses cleanly (the orphan
else:at former line 133 is gone) and the package imports. The fix landed without closing this issue, so closing now as already-resolved.