Skip to content

ci: use cargo-llvm-cov 0.9.2 so coverage works with @argfile - #15

Merged
tntrock merged 1 commit into
mainfrom
ci/fix-llvm-cov-stale-cache
Dec 2, 2026
Merged

tntrock merged 1 commit into
mainfrom
ci/fix-llvm-cov-stale-cache

Conversation

@tntrock

@tntrock tntrock commented Dec 2, 2026 •

Copy link
Copy Markdown
Owner

Problem

Since Rust 1.100 reached the runners, Test with coverage fails on every PR (#12, #14) even though all tests pass:

error: failed to load coverage: '...code_signer-<hash>.exe, ...': no coverage data found

Root cause

A diagnostic run showed the code_signer test binaries had no coverage sections at all, while dependency build scripts did. In other words, the crate was never instrumented.

On Windows, cargo hands rustc its arguments via an @argfile when the command line gets too long. This crate has many dependencies, and the v2 build-dir paths in Rust 1.100 are longer, so it now crosses that limit. cargo-llvm-cov 0.9.1's rustc wrapper does not read @argfile, so it never sees --crate-name code_signer and skips adding -C instrument-coverage. Build scripts have short command lines, which is why only they were instrumented. msu-inspector has fewer dependencies and still passes on 0.9.1.

cargo-llvm-cov 0.9.2 adds @argfile support (taiki-e/cargo-llvm-cov#533).

Fix

  • Bump taiki-e/install-action to v2.90.12, the first release whose manifest includes cargo-llvm-cov 0.9.2.
  • Pin tool: cargo-llvm-cov@0.9.2.

(The earlier cache-key idea in this PR was wrong and has been dropped.)

🤖 Generated with Claude Code

On Windows, cargo hands rustc its arguments via an @argfile when the command
line gets too long (many dependencies plus the longer Rust 1.100 build-dir
paths). cargo-llvm-cov 0.9.1's rustc wrapper does not read @argfile, so it
never sees --crate-name, does not instrument code_signer, and the report
fails with "no coverage data found". 0.9.2 adds @argfile support.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tntrock
tntrock force-pushed the ci/fix-llvm-cov-stale-cache branch from 8817047 to 6af3d19 Compare December 2, 2026 02:46
@tntrock tntrock changed the title ci: start from a clean rust-cache after the Rust 1.100 build-dir change ci: use cargo-llvm-cov 0.9.2 so coverage works with @argfile Dec 2, 2026
@codecov

codecov Bot commented Dec 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@tntrock
tntrock merged commit 58943c3 into main Dec 2, 2026
6 checks passed
@tntrock
tntrock deleted the ci/fix-llvm-cov-stale-cache branch December 2, 2026 02:56
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