Skip to content

Commit c6f15fe

Browse files
committed
Fail build-all loudly; cap cbor2 <6 on PyPy/Windows only (#1859)
The post-merge 26.6.1 dev release failed strict fileset validation with a missing pypy311-win-amd64 wheel. Two defects: 1. build-all (justfile) swallowed per-interpreter build failures: a failing 'just build <venv>' did not fail the recipe (no set -e; the loop ended in 'ls'), so the Windows wheels job went green while silently omitting a wheel. Now build-all attempts all interpreters but exits non-zero if any failed, naming them - the same false-green class as #1856 / zlmdb#116. 2. The PyPy/Windows build aborted installing the core dependency cbor2: cbor2 6.x is Rust/pyo3-only (no PyPy/Windows wheel, and the pure-Python fallback + CBOR2_BUILD_C_EXTENSION toggle were removed in the 6.0 rewrite), so pip built from sdist and the pyo3 link failed (unresolved PyPyModule_FromDefAndSpec2, a known pyo3-on-PyPy/Windows limitation). Cap cbor2 < 6 *only* on PyPy/Windows via environment markers - the 5.x line ships a pure-Python wheel and runs at near-native speed on PyPy - while keeping cbor2 6.x everywhere else. PyPy/Windows is kept as a build target and a required release artifact; the native NVX build is attempted there (it was never reached before, since cbor2 aborted first). If NVX itself turns out not to compile on PyPy/Windows, the now-loud build-all will surface it and we retreat to excluding PyPy/Windows. Note: This work was completed with AI assistance (Claude Code).
1 parent ebde079 commit c6f15fe

3 files changed

Lines changed: 23 additions & 2 deletions

File tree

docs/changelog.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ Changelog
2929
* Bump the ``.cicd`` (wamp-cicd) submodule to pick up the script/shell-injection fix in the shared ``identifiers.yml`` reusable workflow (untrusted GitHub event fields are now passed via ``env:`` as quoted data with a fail-closed branch-name allowlist) (#1856)
3030
* Fail wheel builds hard when NVX was requested (``AUTOBAHN_USE_NVX``) but the CFFI extension did not compile, instead of silently degrading to a pure-Python (``py3-none-any``) wheel. A transient native-compile crash (e.g. a ``gcc`` SIGSEGV under QEMU ARM64 emulation) now aborts the build with a non-zero exit so CI can retry it, rather than uploading a structurally valid but unintended artifact. Building with ``AUTOBAHN_USE_NVX=0`` still produces a pure-Python wheel as before (#1856)
3131
* Fix NVX native-extension builds breaking under cross-compilation (e.g. Buildroot/Yocto for aarch64), where the cross toolchain rejected the host-only ``-march=native`` flag (``unknown value 'native' for '-march'``). The default architecture target is now the portable baseline for *all* build contexts (wheels, local source installs, and cross-compilation), with ``-march=native`` available opt-in via ``AUTOBAHN_ARCH_TARGET=native``. The target architecture is detected via ``sysconfig.get_platform()`` so the correct baseline is chosen when cross-compiling. Thanks to @jameshilliard for the original report and approach (#1834, #1835)
32+
* Fail the ``just build-all`` recipe (non-zero exit) when any per-interpreter wheel build fails, naming the interpreter(s). Previously a failed build was silently swallowed, producing a green wheels job with a missing wheel that was only caught downstream by strict release fileset validation (#1859)
33+
* Cap ``cbor2 < 6`` on PyPy/Windows only (via environment markers), keeping ``cbor2`` 6.x everywhere else. ``cbor2`` 6.x is Rust/pyo3-only with no PyPy/Windows wheel and no pure-Python fallback, so it cannot be installed on PyPy/Windows; the 5.x line ships a pure-Python wheel (and runs at near-native speed on PyPy). This unblocks building and installing autobahn on PyPy/Windows (#1859)
3234

3335
25.12.2
3436
-------

justfile

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1635,10 +1635,24 @@ build-sourcedist venv="": (install-build-tools venv)
16351635
# Meta-recipe to run `build` on all environments
16361636
build-all:
16371637
#!/usr/bin/env bash
1638+
# Build a wheel for every interpreter in ENVS. Attempt ALL interpreters (do
1639+
# not stop at the first failure, so the report is complete), but FAIL the
1640+
# recipe with a non-zero exit if any single build failed, naming them. A
1641+
# silently swallowed per-interpreter failure here previously produced a green
1642+
# job with a missing wheel, only caught downstream by release fileset
1643+
# validation (#1859).
1644+
set -uo pipefail
1645+
failed=()
16381646
for venv in {{ENVS}}; do
1639-
just build ${venv}
1647+
if ! just build "${venv}"; then
1648+
failed+=("${venv}")
1649+
fi
16401650
done
16411651
ls -la dist/
1652+
if [ "${#failed[@]}" -ne 0 ]; then
1653+
echo "ERROR: wheel build failed for interpreter(s): ${failed[*]}" >&2
1654+
exit 1
1655+
fi
16421656
16431657
# Clean build artifacts
16441658
clean-build:

pyproject.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,12 @@ dependencies = [
5151
"msgpack>=1.0.2; platform_python_implementation == 'CPython'",
5252
"u-msgpack-python>=2.1; platform_python_implementation != 'CPython'",
5353
"ujson>=4.0.2", # Binary wheels for both CPython and PyPy
54-
"cbor2>=5.2.0", # Binary wheels + pure Python fallback
54+
# cbor2 6.x is Rust/pyo3-only: no PyPy/Windows wheel and no pure-Python
55+
# fallback, so it cannot be installed on PyPy/Windows. Cap < 6 there (the 5.x
56+
# line ships a pure-Python wheel and runs at near-native speed on PyPy),
57+
# while using cbor2 6.x everywhere else. See #1859.
58+
"cbor2>=5.2.0; platform_python_implementation != 'PyPy' or sys_platform != 'win32'",
59+
"cbor2>=5.2.0,<6; platform_python_implementation == 'PyPy' and sys_platform == 'win32'",
5560
# NOTE: the WAMP "ubjson" serializer (bjdata) is an OPTIONAL extra, NOT a base
5661
# dependency: bjdata pulls in numpy, which we don't want in a minimal install.
5762
# See the [serialization] extra below. This also fixes #1849 (the old, wheel-less

0 commit comments

Comments
 (0)