Taiki Endo

Results 938 comments of Taiki Endo

STATUS: I think it's better than before, but there are still a few problems. > warning: 4 functions have mismatched data

@cloudhead Is there an example that can reproduce the error you encountered?

Thanks. I'll take a look.

#40 fixed all of the errors and many of the warnings that happen in cloudhead/nakamoto. Before #40: ```text warning: 5 functions have mismatched data error: src/block.rs: No such file or...

My understanding is that the coverage is broken due to a bug of rustc's --remap-path-prefix (#140, #122). Could you try #141?

@dominikwilkowski I believe that's also a rustc bug. (maybe related to code generated by `#[test]` attr)

The idea that probably works here is a helper attribute that generates `#[cfg_attr(coverage, no_coverage)]`. ```rs #[cfg(coverage)] use coverage_helper::test; #[test] fn test() { } ``` generated: ```rs #[cfg(coverage)] use coverage_helper::test; #[cfg_attr(coverage,...

[Above my approach](https://github.com/taiki-e/cargo-llvm-cov/issues/123#issuecomment-1059742617) is now implemented as https://github.com/taiki-e/coverage-helper.

Using `#[cfg]` instead of `cfg!` will work as you expect (it is also consistent with how the compiler evaluates the code). For example: https://github.com/taiki-e/cargo-llvm-cov/blob/a405503bbe508ceb3e9ab7246579eb72bcb49c51/tests/fixtures/coverage-reports/cargo_config/cargo_config.hide-instantiations.txt#L11-L14 Appling the same behavior to `cfg!`...

Thanks for the heads up! As you mentioned, we set LLVM_PROFILE_FILE so it would not be affected. https://github.com/taiki-e/cargo-llvm-cov/blob/f7870c5df548613f62de4aa472db552a669ed09b/src/main.rs#L230 However, https://github.com/rust-lang/rust/pull/100384 may help avoid the problem of profiles being ignored when...