rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
98.22k stars 12.7k forks source link

Strange coverage results from `-C instrument-coverage` #102477

Open Mingun opened 2 years ago

Mingun commented 2 years ago

I do not know in what part the problem begins, so if rustc has nothing to do with it, please tell me how to check that. I'm a maintainer of quick-xml and I setup a coverage for it and collect coverage, using RUSTFLAGS: -C instrument-coverage.

However, results on codecov.io looks very strange:

Meta

The coverage is collected by GitHub ubuntu-latest runner, currently it reports Rust 1.64.0, but the issue was there since coverage was added to quick-xml, i.e. at least since 2022-05-30. The corresponding GitHub Actions file: https://github.com/tafia/quick-xml/blob/240f2049aec50876b6e13e632120b20cd60a37af/.github/workflows/rust.yml

taiki-e commented 1 year ago

@rustbot label +A-code-coverage

juntyr commented 1 year ago

I'm also experiencing the same issues. Producing the coverage locally and using the VSCode coverage gutters extension to view it shows much cleaner coverage information. So perhaps this is an issue on codecov's end?