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

Comments

Projects
None yet
4 participants
@jayconrod
Copy link
Contributor

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 this to the Go1.12.2 milestone Mar 19, 2019

@dmitshur

This comment has been minimized.

Copy link
Member

commented Mar 21, 2019

(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

This comment has been minimized.

Copy link
Member

commented Mar 21, 2019

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

@gopherbot

This comment has been minimized.

Copy link

commented Mar 21, 2019

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

This comment has been minimized.

Copy link

commented Apr 5, 2019

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

@gopherbot gopherbot closed this Apr 5, 2019

gopherbot pushed a commit that referenced this issue Apr 5, 2019

[release-branch.go1.12] cmd/go: avoid link error when -coverpkg cover…
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.