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.
ebuild/build/dispatch.pyonmasterdoes not parse. The package cannot beimported, so no ebuild command runs at all.
The line:
An
else:with nothing to bind to, immediately after a completedraise.Cause
Two different designs for the unknown-backend error path — one raising
ValueError, one raisingRuntimeError— were each green on their own branchand 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 lookedlike. Nothing recompiled the result before it became
master.Identical in shape to eos#92, where
sync.cended up referencingoriginal_priofrom one priority-inheritance design and
g_blocked_onfrom another. Same rootcause, different repository.
Impact
Total.
dispatch.pyis imported by the CLI, soebuild build,ebuild configure,ebuild info— every command — fails at import. The suite reports11 failures / 190 passed on
masteronce the file is made parseable by hand;until then it does not collect.
Why nothing caught it
required_status_checksisnull. Nothing builds or imports the merge resultbefore 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
_unknown_backend()helper. Already approved.dispatch.pystill 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.