Skip to content

[mypyc] Add missing header includes in lib-rt files#21046

Merged
p-sawicki merged 3 commits intopython:masterfrom
p-sawicki:fix-missing-includes
Mar 19, 2026
Merged

[mypyc] Add missing header includes in lib-rt files#21046
p-sawicki merged 3 commits intopython:masterfrom
p-sawicki:fix-missing-includes

Conversation

@p-sawicki
Copy link
Collaborator

@p-sawicki p-sawicki commented Mar 19, 2026

These headers use objects from stdbool.h and mypyc_util.h without including them so they currently rely on the dependencies being included somewhere earlier in the compiled .c file. However compiling just stringwriter_extra_ops.c or byteswriter_extra_ops.c with MYPYC_EXPERIMENTAL defined results in errors.

Added a test to compile every .c file in mypyc/lib-rt individually with and without MYPYC_EXPERIMENTAL defined to catch these issues in the future. ChatGPT wrote the test and I have verified that removing a necessary header include fails it.

@p-sawicki p-sawicki merged commit 8fae935 into python:master Mar 19, 2026
17 checks passed
@p-sawicki p-sawicki deleted the fix-missing-includes branch March 19, 2026 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants