-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
cmd/cover: cannot run in directory with no .go files #33855
Comments
As far as I can tell, this is the same underlying issue as #33157.
@rhysh, is there a particular reason you need or expect |
For background, this is part of an import of go1.13rc1 into my company's build system. The build scripts worked with go1.12.x and earlier, and work with go1.13beta1. The build scripts run the tests for several packages with code coverage enabled. They then convert the raw coverage reports into html. It's that conversion from raw to html that encounters the problem. Why should the current working directory have an effect on how a raw coverage report is converted into html? Why does |
It looks like the problem is in The call to Do the integration tests for this code live in src/cmd/go/testdata/script? I don't see any there currently. |
Change https://golang.org/cl/192340 mentions this issue: |
I'm not sure, but the new test seems fine there to me. |
@gopherbot, please backport to Go 1.13: this is a regression from Go 1.12. |
Backport issue(s) opened: #33983 (for 1.12), #33984 (for 1.13). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://golang.org/wiki/MinorReleases. |
Only call "go list" when explicitly listing packages. An empty coverage profile references no packages, and would otherwise lead to "go list" implicitly looking at the package in "." (which might not exist). Fixes golang#33855 Change-Id: I02d4e374405d86f03d105fe14648aa03b4d2284c Reviewed-on: https://go-review.googlesource.com/c/go/+/192340 Reviewed-by: Bryan C. Mills <bcmills@google.com> Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
Only call "go list" when explicitly listing packages. An empty coverage profile references no packages, and would otherwise lead to "go list" implicitly looking at the package in "." (which might not exist). Fixes golang#33855 Change-Id: I02d4e374405d86f03d105fe14648aa03b4d2284c Reviewed-on: https://go-review.googlesource.com/c/go/+/192340 Reviewed-by: Bryan C. Mills <bcmills@google.com> Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
This problem is present on
go1.13rc1
. It is not present ingo1.12.9
.What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
What did you see instead?
git bisect
points to 4a2d3d0 (authored in December, but committed in July) as the first "bad" commit.The text was updated successfully, but these errors were encountered: