-
Notifications
You must be signed in to change notification settings - Fork 646
go coverage highlights are not showing up after go mod #1927
Comments
#1532 is tracking all the features that need to be fixed when using Go modules. Can you please add this there? |
Re-opening this, as this can be dealt with separately. The problem is that the coverage report generated by For example, below is an example of the coverage data:
In the world of GOPATH, I could add coverage to the file whose path ends with @bcmills Would it be a reasonable request to the Go tool, to have the coverage data contain the absolute paths of the files? |
I'll have to give it some thought. Absolute paths would make the coverage results less cacheable, e.g. for distributed build systems where two users may run coverage with the same source versions but different absolute paths. |
For converting the converprofile to absolute paths, a minimal tool can be used https://gist.github.com/egonelbre/6b0e3048bb28423d52a62ed1633e693d This could be a workaround until a decision is reached for the coverage tool. |
Thanks @egonelbre |
I have pushed a fix to master. Can folks here try out the beta version of this extension and confirm that the fix works? |
UPDATE: I found that these errors are due to changes in I tried to install the forked tools after installing the latest beta I got these errors
go version
|
@mrg0lden the package interfaces changed so the programs need adjusting (caused by commit golang/tools@2f1727f) |
Well, I managed to compile both of them, but now I get a notification that says: "Auto-completion feature failed as an older gocode process is still running. Please kill the running process for gocode and try again.". UPDATE: I killed the process, rebooted the system, but still getting the same error. |
@ramya-rao-a Yeah you're right. Sorry, got excited with the update and thought it has to do with auto-completion. |
@mrg0lden No problem, #1979 is now resolved. Please see |
This is fixed in the latest update to the Go extension (0.6.91) |
When a go.mod file exists no test highlights are visible. When a simple go app is created with a main.go and main_test.go file highlights are visible. When I run
go mod init app
and run the tests again, the highlight disappears.Go: Test Project
no coverage highlights are seen.Go: Toggle test coverage in test package
thenGo: Test Project
GOPATH:
/home/chris/.gvm/pkgsets/go1.11/global
OS: KDE Neon (Linux 4.15.0-33-generic #36~16.04.1-Ubuntu SMP Wed Aug 15 17:21:05 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux)
VSCode: 1.27.1
GO: 1.11
The text was updated successfully, but these errors were encountered: