Skip to content

Fix coverage for crates with mixed sources#4079

Open
martingms wants to merge 1 commit into
bazelbuild:mainfrom
martingms:fix-coverage-mixed-crates
Open

Fix coverage for crates with mixed sources#4079
martingms wants to merge 1 commit into
bazelbuild:mainfrom
martingms:fix-coverage-mixed-crates

Conversation

@martingms

Copy link
Copy Markdown
Contributor

Crates with generated sources are compiled from the output tree, so their coverage mapping records bazel-out/... paths, which Bazel's lcov merger silently drops. Remap the prefix away so coverage paths come out workspace-relative.

I'm not 100% confident this is the correct fix, but it fixes the coverage for us in crates that has both in-tree and generated src files.

Crates with generated sources are compiled from the output tree, so
their coverage mapping records bazel-out/... paths, which Bazel's lcov
merger silently drops. Remap the prefix away so coverage paths come
out workspace-relative.
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