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/go: duplicate symbols when including two main packages in -coverpkg in module mode [1.12 backport] #30937

Closed
jayconrod opened this issue Mar 19, 2019 · 4 comments
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge
Milestone

Comments

@jayconrod
Copy link
Contributor

jayconrod commented Mar 19, 2019

I'd like CL 168200 to be cherry-picked for 1.12.2.

This was the second fix for #30374 (its first backport issue was #30684). The first fix, CL 164877, was backported and released in 1.12.1, but it missed an important case that was discovered later.

#30374 (aka #30684) was a regression from GOPATH mode, and the fix is again straightforward.

(I know gopherbot usually opens these issues; I asked politely, but it didn't do it).

@jayconrod jayconrod added the CherryPickCandidate Used during the release process for point releases label Mar 19, 2019
@jayconrod jayconrod added this to the Go1.12.2 milestone Mar 19, 2019
@dmitshur
Copy link
Contributor

(I know gopherbot usually opens these issues; I asked politely, but it didn't do it).

For reference, this is tracked in issue #25574. Until that is resolved, gopherbot listens for backport requests at most one time per issue.

@dmitshur dmitshur added CherryPickApproved Used during the release process for point releases and removed CherryPickCandidate Used during the release process for point releases labels Mar 21, 2019
@dmitshur
Copy link
Contributor

Cherry pick approved because this is a followup to a fix for a significant regression from GOPATH mode.

@gopherbot
Copy link

Change https://golang.org/cl/168717 mentions this issue: [release-branch.go1.12] cmd/go: avoid link error when -coverpkg covers main packages (more)

@andybons andybons modified the milestones: Go1.12.2, Go1.12.3 Apr 5, 2019
@gopherbot
Copy link

Closed by merging 4fc9d3b to release-branch.go1.12.

gopherbot pushed a commit that referenced this issue Apr 5, 2019
…s main packages (more)

This fixes two problems missed in CL 164877.

First, p.Internal.BuildInfo is now part of the cache key. This is
important since p.Internal.BuildInfo causes the build action to
synthesize a new source file, which affects the output.

Second, recompileForTest is always called for test
packages. Previously, it was only called when there were internal test
sources, so the fix in CL 164877 did not apply to packages that only
had external tests.

Fixes #30937

Change-Id: Iac2d7e8914f0313f9ab4222299a866f67889eb2e
Reviewed-on: https://go-review.googlesource.com/c/go/+/168200
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
(cherry picked from commit d34548e)
Reviewed-on: https://go-review.googlesource.com/c/go/+/168717
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
@golang golang locked and limited conversation to collaborators Apr 4, 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

4 participants