Skip to content
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 [1.13 backport] #33984

Closed
gopherbot opened this issue Aug 30, 2019 · 6 comments
Closed

cmd/cover: cannot run in directory with no .go files [1.13 backport] #33984

gopherbot opened this issue Aug 30, 2019 · 6 comments
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge
Milestone

Comments

@gopherbot
Copy link

@rhysh requested issue #33855 to be considered for backport to the next 1.13 minor release.

@gopherbot, please backport to Go 1.13: this is a regression from Go 1.12.

@gopherbot gopherbot added the CherryPickCandidate Used during the release process for point releases label Aug 30, 2019
@gopherbot
Copy link
Author

Change https://golang.org/cl/192722 mentions this issue: [release-branch.go1.13] cmd/cover: skip go list when profile is empty

@andybons andybons added this to the Go1.13.1 milestone Sep 2, 2019
@julieqiu
Copy link
Member

julieqiu commented Sep 3, 2019

@rhysh @bcmills would you categorized this as a serious problem with no workaround?

Under our policy at https://github.com/golang/go/wiki/MinorReleases, only fixes for security issues, serious problems with no workaround, and documentation fixes will be backported.

@bcmills
Copy link
Contributor

bcmills commented Sep 3, 2019

It's a regression from 1.12.

There is a workaround (which is to avoid running go tool cover in a directory that does not contain a Go package). However, the fix CL is also very small and seems low-risk.

@katiehockman
Copy link
Contributor

@andybons commented in the change, but to re-iterate here: let's wait to approve and merge this until 1.13 is out.

This can be added to a point release since it isn't a major issue, even if the fix is small

@andybons
Copy link
Member

OK. 1.13 is out. Will let whomever is on rotation make the final call.

@bcmills bcmills added the CherryPickApproved Used during the release process for point releases label Sep 24, 2019
@gopherbot gopherbot removed the CherryPickCandidate Used during the release process for point releases label Sep 24, 2019
@gopherbot
Copy link
Author

Closed by merging 7d1c61c to release-branch.go1.13.

gopherbot pushed a commit that referenced this issue Sep 24, 2019
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 #33984

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>
(cherry picked from commit 9d480ed)
Reviewed-on: https://go-review.googlesource.com/c/go/+/192722
@bcmills bcmills modified the milestones: Go1.13.1, Go1.13.2 Sep 25, 2019
@katiehockman katiehockman modified the milestones: Go1.13.2, Go1.13.3 Oct 17, 2019
@golang golang locked and limited conversation to collaborators Oct 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge
Projects
None yet
Development

No branches or pull requests

5 participants