taiki-e / cargo-llvm-cov

Cargo subcommand to easily use LLVM source-based code coverage (-C instrument-coverage).
Apache License 2.0
920 stars 57 forks source link

Demangling #341

Closed smoelius closed 8 months ago

smoelius commented 8 months ago

I happened upon this recently: https://github.com/taiki-e/cargo-llvm-cov/blob/071a9efe6b9837a1e0ddc522df98e0ab7170e488/src/cli.rs#L962

Is it possible for mere mortals to use that subcommand (even if its unstable)?

If it's not possible, is there another demangling approach that you recommend?

(This is relate to #325. The symbols in those results are mangled, which is unfortunate.)

taiki-e commented 8 months ago

is there another demangling approach that you recommend?

See https://github.com/luser/rustfilt

smoelius commented 8 months ago

Oh wow. It looks like it's as simple as running rustfilt -i old-lcov-file -o new-lcov-file. This also seems to solve my crate disambiguators issue.

Just to confirm, this is the approach you had in mind?

Not something more sophisticated like using -X flags (as suggested here)?

taiki-e commented 8 months ago

This also seems to solve my crate disambiguators issue.

Oh, I didn't know that using rustfilt would fix #325. I guess that means the logic used there is better than what we are using. We should fix our implementation with reference to it.

smoelius commented 8 months ago

Thanks!