ryanluker / vscode-coverage-gutters

Display test coverage generated by lcov and xml - works with many languages
https://marketplace.visualstudio.com/items?itemName=ryanluker.vscode-coverage-gutters
MIT License
460 stars 88 forks source link

Regression in 2.4.x #248

Closed davidbrownellWork closed 4 years ago

davidbrownellWork commented 4 years ago

Describe the bug I am able to display coverage information in 2.3.1. However, I do not see coverage information using the same lcov file and configuration in the 2.4.x versions of the extension. The lcov file is using relative paths.

I've noticed that the 2.3.1 version prints extensive JSON information with line information while 2.4.x does not; I don't know if this is functionality that has been removed in the new version or somehow associated with the issue.

With the exception of the JSON information in 2.3.1, both version print the following:

[1575679691475][coverageservice]: INITIALIZING
[1575679735858][coverageservice]: LOADING
[1575679736129][coverageservice]: Loading 1 file(s)
[1575679736180][coverageservice]: Loaded 1 data file(s)
[1575679736729][coverageservice]: Caching 82 coverage(s)
[1575679736729][printDataCoverage]: Coverage -> 82
[1575679736729][coverageservice]: READY
[1575679736729][coverageservice]: RENDERING
[1575679736730][coverageservice]: READY
[1575679743279][coverageservice]: RENDERING
[1575679743283][coverageservice]: READY
[1575679743341][coverageservice]: RENDERING
[1575679743362][coverageservice]: READY

Desktop (please complete the following information):

ryanluker commented 4 years ago

@davidbrownellWork thanks for submitting an issue, this most likely is an issue with the new relative source finding system, can you provide a sample lcov file that you are trying to display coverage for?

raiyankamal commented 4 years ago

Edit1 I found out the root case in my case and it's not a bug in coverage-gutters. I was running tests inside a docker container. As a result the file paths in my coverage report were relative to the mount point inside the container, not my host machine. No wonder coverage-gutters was not able to find my files.

Comment before Edit1

I'm experiencing the same issue, on two different computers. In both cases I see this as output:

[1577495271319][coverageservice]: LOADING
[1577495271515][coverageservice]: Loading 1 file(s)
[1577495271516][coverageservice]: Loaded 1 data file(s)
[1577495271526][coverageservice]: Caching 20 coverage(s)
[1577495271526][printDataCoverage]: Coverage -> 20
[1577495271526][coverageservice]: READY
[1577495271526][coverageservice]: RENDERING
[1577495271527][coverageservice]: READ

My coverage file is an xml file generated by pytest-cov.

Computer1:

Compuer2:

ryanluker commented 4 years ago

@raiyankamal thanks for the update, you can use the remote path feature to fix this if you continue to run the tests in a docker conatiner! https://github.com/ryanluker/vscode-coverage-gutters/blob/master/package.json#L127-L131

ryanluker commented 4 years ago

@davidbrownellWork any chance for that sample lcov file? If I dont hear from you shortly I will close the issue for now but more then willing to pick it back up at a later date :grin: .

davidbrownellWork commented 4 years ago

I apologize, @ryanluker, I am slammed these days. Let's close this issue and reopen when I have time to put together a small sample the reproduces the issue. Thanks for following up!