Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The plugin silently fails on lcov file that has end_of_record in a function name #16

Closed
konnov opened this issue Mar 27, 2025 · 7 comments
Assignees

Comments

@konnov
Copy link

konnov commented Mar 27, 2025

Hi @rherrmannr!

Thank you for the amazing plugin! I started to use it today, and it really does what I expected from a coverage viewer.

Unfortunately, I've hit a bug on this line:

let absolutePath = getAbsolutePath(file.file);

I've tracked down the problem to lcov-parse. Basically, it returns malformed entries, when the file contains functions or filenames that have end_of_record as part of their name. Surprisingly, a rust library called socket2 has a function like that.

Interestingly, I am not the first one to have this issue with lcov-parse. @thomascjohnson opened a PR with a fix on December 2024. There was no movement since then, so lcov-parse does not seem to be maintained.

Anyhow, I would appreciate, if you could add a fix. Even a simple workaround for the issue with missing file field in getAbsolutePath would make it work for me:

        if (file.file) {
          let absolutePath = getAbsolutePath(file.file);
          if (absolutePath) {
              file.file = absolutePath;
          }
        }
@thomascjohnson
Copy link

Alternatively we could maintain a fork of lcov-parse with the change I proposed for this extension, but I know that's a mousetrap of its own.

@rherrmannr
Copy link
Owner

I think we can use a fork as the repo is not maintained anymore.

Maybe we can use a different parser?

@rherrmannr
Copy link
Owner

I've published a version 1.1.4, which is now using the fork of @thomascjohnson.

@rherrmannr rherrmannr self-assigned this Apr 5, 2025
@rherrmannr
Copy link
Owner

Solved with 03521e6

@thomascjohnson
Copy link

Thank you!

@rherrmannr
Copy link
Owner

Let me know if it works for you

@thomascjohnson
Copy link

Works beautifully!

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

No branches or pull requests

3 participants