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: module's "go" version should be included in cache key #37804

Closed
bcmills opened this issue Mar 11, 2020 · 7 comments
Closed

cmd/go: module's "go" version should be included in cache key #37804

bcmills opened this issue Mar 11, 2020 · 7 comments
Labels
FrozenDueToAge modules NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@bcmills
Copy link
Contributor

bcmills commented Mar 11, 2020

The following test case fails, because the second go build succeeds.

It should not: the change in go version should revoke the “duplicate interface method” support added in Go 1.14.

I suspect that we are not including the go version in the cache key. We should.

CC @jayconrod @matloob @jadekler @davecheney

go build .
go mod edit -go=1.13
go build .
stderr '^./main.go:7:2: duplicate method Close$'

-- go.mod --
module play.golang.org/main

go 1.14
-- main.go --
package main

import "io"

type ReadWriteCloser interface {
        io.ReadCloser
        io.WriteCloser
}

func main() {}
@bcmills bcmills added NeedsFix The path to resolution is known, but the work has not been done. modules labels Mar 11, 2020
@bcmills bcmills added this to the Go1.15 milestone Mar 11, 2020
@bcmills
Copy link
Contributor Author

bcmills commented Mar 12, 2020

@gopherbot, please backport to 1.13 and 1.14: this issue can cause spuriously-successful builds for packages that will not build once published, and there is no workaround for spurious success.

@gopherbot
Copy link

Backport issue(s) opened: #37821 (for 1.13), #37822 (for 1.14).

Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://golang.org/wiki/MinorReleases.

@gopherbot
Copy link

Change https://golang.org/cl/223139 mentions this issue: cmd/go: include the go language version in cache keys

@bcmills bcmills self-assigned this Mar 12, 2020
@gopherbot
Copy link

Change https://golang.org/cl/223141 mentions this issue: cmd/go: include the go language version in cache keys

@gopherbot
Copy link

Change https://golang.org/cl/223141 mentions this issue: [release-branch.go1.14] cmd/go: include the go language version in cache keys

@gopherbot
Copy link

Change https://golang.org/cl/223142 mentions this issue: [release-branch.go1.13] cmd/go: include the go language version in cache keys

@gopherbot
Copy link

Change https://golang.org/cl/223144 mentions this issue: cmd/go: add missing newline to "go" line in cache key

gopherbot pushed a commit that referenced this issue Mar 12, 2020
This was missed in CL 223139. It doesn't seem to affect correctness,
but might be confusing if we need to debug the cache key.

Updates #37804

Change-Id: I979efa68381cf79a7e246581510c90a724be6cd9
Reviewed-on: https://go-review.googlesource.com/c/go/+/223144
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Jay Conrod <jayconrod@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
gopherbot pushed a commit that referenced this issue Mar 12, 2020
…che keys

Fixes #37822
Updates #37804

Change-Id: I4381dc5c58cfd467506d3d73fbd19c2c7257338e
Reviewed-on: https://go-review.googlesource.com/c/go/+/223139
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
(cherry picked from commit feea3f165770025b045c6dd46747b1debdaf348e)
Reviewed-on: https://go-review.googlesource.com/c/go/+/223141
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
gopherbot pushed a commit that referenced this issue Mar 12, 2020
…che keys

Fixes #37821
Updates #37804

Change-Id: I4381dc5c58cfd467506d3d73fbd19c2c7257338e
Reviewed-on: https://go-review.googlesource.com/c/go/+/223139
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
(cherry picked from commit c957084)
Reviewed-on: https://go-review.googlesource.com/c/go/+/223142
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
@golang golang locked and limited conversation to collaborators Mar 12, 2021
@rsc rsc unassigned bcmills Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge modules NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

2 participants