-
Notifications
You must be signed in to change notification settings - Fork 645
Background of covered and not covered code cannot be removed after running package test #3252
Comments
Yes. |
Thanks. I could reproduce this as well. |
I would strongly support reverting this change. I thought my IDE was broken because changing code and saving would no longer remove the coverage highlighting, as it has for literally years prior. If not, please give us a toggle to support the original behavior. I know I can bring up the menu and toggle test coverage (or set a keybinding, etc, etc), but that's a slew of new steps that weren't needed before. |
I had the same experience, @blocknonip. I thought I was going crazy for about an hour - went through restarting/reinstalling everything multiple times, modifying all the coverage-related settings... I understand the motivation for this, and can see how maintaining the highlighting during typing is potentially helpful. But from my reading of the PR, I also assumed that the coverage info would disappear if the file was saved. Instead, for me, new text is highlighted in a grayer shade of green, and I can only turn it off with the menu > toggle. |
One of the conditionals on https://github.com/microsoft/vscode-go/pull/2853/files#diff-44e85398a1742b4d78705053c4a98671R300 must be failing - there was a long period between me making that PR and asserting its behaviour and it ended up getting merged in, so it's possible something has changed in the intervening months which breaks the PR. |
This is a fix for the regression in ms-vscode.Go@0.14.2 The `isDirty` bit of the TextDocument when vscode.workspace.onDidSaveTextDocument is already false. Adjust the condition for clearing cache not to check it. Modification should be tracked already by trackCodeCoverageRemovalOnFileChange. And let modifiedFiles start with an empty value rather than as undefined. Fixes github.com/microsoft/issues/3252.
@kegsay thanks for the pointer. I don't know why but I observed @ramya-rao-a I sent my PR for the fix in golang/vscode-go. How do you want to handle PRs for minor bug fixes like this during the repo migration? |
What version of Go, VS Code & VS Code Go extension are you using?
go version
to get version of Gogo version go1.14.3 windows/amd64
code -v
orcode-insiders -v
to get version of VS Code or VS Code Insidersgo env
to get the go development environment detailsShare the Go related settings you have added/edited
Run
Preferences: Open Settings (JSON)
command to open your settings.json file.Share all the settings with the
go.
or["go"]
orgopls
prefixes.Describe the bug
Before Go extension 0.14.2, when I executed the
run package test
the covered and not covered code showed in green and red background can be restored to code without the background only editing a file. Now is not possible. I need to restart vscode to remove that background.Steps to reproduce the behavior:
run package test
The text was updated successfully, but these errors were encountered: