Skip to content

fix: declare --annotate HTML output as a byproduct#90

Merged
henryiii merged 2 commits into
mainfrom
fix/annotate-byproducts
Jul 10, 2026
Merged

fix: declare --annotate HTML output as a byproduct#90
henryiii merged 2 commits into
mainfrom
fix/annotate-byproducts

Conversation

@henryiii

@henryiii henryiii commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

🤖 AI text below 🤖

Cython's -a/--annotate (and --annotate-fullc/--annotate-coverage) options generate a colorized .html file next to the generated .c/.cxx source, but cython_transpile never declared it to CMake. It wasn't tracked for clean and Ninja had no idea it existed.

This detects annotate-related flags in the effective CYTHON_ARGS (including inside a $<...> generator expression) and adds the .html file as a BYPRODUCTS of the add_custom_command.

Addresses item 6 of #84.

Cython's -a/--annotate (and --annotate-fullc/--annotate-coverage)
generate a colorized .html file next to the .c/.cxx output, but
cython_transpile never told CMake about it. It wasn't tracked for
`clean` and Ninja didn't know it existed. Declare it as a
BYPRODUCTS of the add_custom_command when detected in CYTHON_ARGS.

Assisted-by: ClaudeCode:claude-sonnet-5
@henryiii
henryiii force-pushed the fix/annotate-byproducts branch from 53ef9f0 to bb401a6 Compare July 9, 2026 20:49
MSBuild's clean target does not remove custom-command BYPRODUCTS,
so the simple.html assertion failed on Windows CI.

Assisted-by: ClaudeCode:claude-fable-5
@henryiii
henryiii marked this pull request as ready for review July 9, 2026 21:39
@henryiii
henryiii merged commit 1568e5b into main Jul 10, 2026
28 checks passed
@henryiii
henryiii deleted the fix/annotate-byproducts branch July 10, 2026 15:13
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.

1 participant