Skip to content

Report a clearer error when .gcda files are found without .gcno files - #1532

Open
chiliec wants to merge 1 commit into
mozilla:masterfrom
chiliec:gcda-without-gcno-error
Open

chiliec wants to merge 1 commit into
mozilla:masterfrom
chiliec:gcda-without-gcno-error

Conversation

@chiliec

@chiliec chiliec commented Sep 26, 2026

Copy link
Copy Markdown

Fixes #586.

When the inputs contain .gcda files but no .gcno files (e.g. after find . -name "*.gc*" -delete wiped the compile-time notes), grcov panicked with the generic No input files found. It now reports:

Invalid input files: found .gcda files without .gcno files (the .gcno files should be produced during compilation, were they removed?)

The existing message is kept when there are no input files at all.

Test: tightened the existing test_zip_producer_with_gcda_archive_and_no_gcno_archive to #[should_panic(expected = "found .gcda files without .gcno files")]. It fails on main (panic has the old message) and passes with this change.

Validation (local, rustc 1.98.1):

  • cargo test --lib: 137 passed. 4 llvm_tools::tests::* fail because llvm-profdata isn't installed on my machine. They fail the same way on unmodified main.
  • cargo fmt --check: clean
  • cargo clippy --lib --tests: no warnings

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.

Better error message for case when zip contains .gcda but misses .gcno

1 participant