Skip to content
This repository was archived by the owner on Jul 15, 2023. It is now read-only.

Code coverage only shows for focused file when multiple are visible #2608

Closed
zikaeroh opened this issue Jun 27, 2019 · 8 comments
Closed

Code coverage only shows for focused file when multiple are visible #2608

zikaeroh opened this issue Jun 27, 2019 · 8 comments

Comments

@zikaeroh
Copy link

Steps to Reproduce:

  1. Run the "toggle test coverage in current package" command with two files in the same package open, split so both are visible.
  2. Only the file which has focus shows code coverage.

I might be remembering incorrectly, but I don't believe this used to happen. An example where I just click from one side to the other:

image

image

@ramya-rao-a
Copy link
Contributor

Thanks for reporting @zikaeroh
This definitely used to work before, am not sure if something changed in the Go extension or VS Code itself to cause this.

I'd appreciate any help in figuring out the root cause here

Code Pointers:

  • See Build and Debug Extension to set up local dev environment
  • goCover.ts is the file with all the code regarding code coverage

@zikaeroh
Copy link
Author

I went back to 0.9.0 and tested, and the same thing happened (and I definitely didn't have this issue 3 months ago). On to the VSC bisect, I guess...

@zikaeroh
Copy link
Author

I'm utterly confused. I went all the way back to 1.32.1 and 0.8.0, and every combination did what I showed above. Surely this worked before and I'm not insane...

@ramya-rao-a
Copy link
Contributor

@zikaeroh I believe you are not insane :) I remember testing this exact feature once before.
This would mean that there is some issue with the API between VS Code and the extensions. Can you try going back to an older version of VS Code itself? You can find all versions at https://code.visualstudio.com/updates/v1_35

@zikaeroh
Copy link
Author

That's what I did, I built VS Code from source after failing to bisect this repo (thinking I'd bisect it instead), but even bringing that back to 1.32.1 didn't fix it. I don't remember this not working back then, hence my confusion.

@ramya-rao-a
Copy link
Contributor

Ah! found the issue, looks like the bug got introduced about 9 months ago.
I have pushed a fix.
Can you give it a try by getting the latest beta version of this extension?

@zikaeroh
Copy link
Author

Yes, it seems to be working. Thank you!

@ramya-rao-a
Copy link
Contributor

Thanks for reporting @zikaeroh!

This issue is now fixed in the latest update (0.11.1) to the Go extension

@vscodebot vscodebot bot locked and limited conversation to collaborators Aug 13, 2019
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

No branches or pull requests

2 participants