Repository navigation
tools: make_amplify_dxil writes '?' for what a redirected stdout cannot encode - #2827
Conversation
…ot encode test_tool_stdout_encoding.py requires every tool's __main__ to set errors='replace' on stdout, for a redirected stdout that is a strict ANSI code page under -I. The new tool did not, so main failed that test on both Linux and Windows. Same block as ab_control_flow.py and the other tools.
|
Verified (not the author). AI-assisted (Claude Code agent Head
With #2825 (the missing |
|
Merging. Head |
|
Superseded by the combined pull request if you prefer one merge: both reds (mod asbench and this tool's |
main023043bfefailstests/test_tool_stdout_encoding.py, on both Linux and Windows, because the tool that landed with it does not do what every other tool intools/does. Four lines, the same block as its neighbours.Seen first on a pull request that has nothing to do with it - #2825 removes a Rust module declaration, and
linux-python-and-viewercame back red. So I ran it onmainwith nothing applied:And in CI, in both jobs:
So it is not flaky and not platform-specific: it is the repository's own convention test doing its job on a file that arrived without the convention.
The change:
Copied from
ab_control_flow.py, which has the same block with the same comment -address_guard.py,amd_swizzle.pyand the rest have it too.Verified:
What this does not fix: the tool still cannot encode a character its code page lacks - it now writes
?instead of raising. That is exactly what the other tools do and what the test asks for; whethermake_amplify_dxil.pyshould print anything that a code page cannot encode is a different question, and it prints paths and DXC's output.AI-assisted: yes - DeepSeek v4.1 (flash), which found it by chasing a red that was not its own.
Written with an AI assistant.