Steps 2 and 3 (spirv-opt, spirv-dis) run subprocess without text=True, so
result.stderr is bytes -- and `sys.stderr.write(bytes)` raises TypeError. The
tool's real message is replaced by a Python traceback at exactly the moment you
need it.
Building in a clean container, the visible failure was:
ERROR: spirv-opt failed for guest_output_bilinear.ps.xesl
TypeError: write() argument must be str, not bytes
with the actual cause -- `Unknown flag '--canonicalize-ids'`, i.e. a SPIRV-Tools
too old -- never printed. Use .buffer.write, as compile_shader_dxbc.py already
does at the same site.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>