cmd/go: missing sum after updating a different package #44129
Comments
I have just encountered this problem as well. Running with Go 1.15 is temporarily fixing my issue, but I would appreciate guidance so that I can use Go 1.16 without trying to mess around with my |
For anyone running into this issue in Go 1.16, you can use
|
Unfortunately I'm also hitting this error and neither kirr@deco:~/tmp/trashme$ git clone https://lab.nexedi.com/kirr/wendelin.core
Клонирование в «wendelin.core»…
warning: переадресация на https://lab.nexedi.com/kirr/wendelin.core.git/
remote: Enumerating objects: 15831, done.
remote: Counting objects: 100% (15831/15831), done.
remote: Compressing objects: 100% (4249/4249), done.
remote: Total 15831 (delta 11537), reused 15632 (delta 11373)
Получение объектов: 100% (15831/15831), 7.04 MiB | 2.96 MiB/s, готово.
Определение изменений: 100% (11537/11537), готово.
kirr@deco:~/tmp/trashme$ cd wendelin.core/
kirr@deco:~/tmp/trashme/wendelin.core$ git checkout 481ffb89e78d310f9bdc79f14771494215d0d55a
Note: switching to '481ffb89e78d310f9bdc79f14771494215d0d55a'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD сейчас на 481ffb8 X wcfs: v↑ * (checkpoint)
kirr@deco:~/tmp/trashme/wendelin.core$ cd wcfs/
kirr@deco:~/tmp/trashme/wendelin.core/wcfs$ go1.16 build
/home/kirr/go/pkg/mod/lab.nexedi.com/kirr/go123@v0.0.0-20210302025843-863c4602a230/xnet/lonet/registry_sqlite.go:28:2: missing go.sum entry for module providing package crawshaw.io/sqlite (imported by lab.nexedi.com/kirr/go123/xnet/lonet); to add:
go get lab.nexedi.com/kirr/go123/xnet/lonet@v0.0.0-20210302025843-863c4602a230
/home/kirr/go/pkg/mod/lab.nexedi.com/kirr/go123@v0.0.0-20210302025843-863c4602a230/xnet/lonet/registry_sqlite.go:29:2: missing go.sum entry for module providing package crawshaw.io/sqlite/sqlitex (imported by lab.nexedi.com/kirr/go123/xnet/lonet); to add:
go get lab.nexedi.com/kirr/go123/xnet/lonet@v0.0.0-20210302025843-863c4602a230
/home/kirr/go/pkg/mod/lab.nexedi.com/kirr/neo/go@v0.0.0-20210302031331-91085e39ea86/neo/neonet/misc.go:27:2: missing go.sum entry for module providing package github.com/philhofer/fwd (imported by lab.nexedi.com/kirr/neo/go/neo/neonet); to add:
go get lab.nexedi.com/kirr/neo/go/neo/neonet@v0.0.0-20210302031331-91085e39ea86
kirr@deco:~/tmp/trashme/wendelin.core/wcfs$ go1.16 get lab.nexedi.com/kirr/go123/xnet/lonet@v0.0.0-20210302025843-863c4602a230
kirr@deco:~/tmp/trashme/wendelin.core/wcfs$ go1.16 get lab.nexedi.com/kirr/go123/xnet/lonet@v0.0.0-20210302025843-863c4602a230
kirr@deco:~/tmp/trashme/wendelin.core/wcfs$ git st
HEAD отделён на 481ffb8
нечего коммитить, нет изменений в рабочем каталоге
kirr@deco:~/tmp/trashme/wendelin.core/wcfs$ go1.16 get -v lab.nexedi.com/kirr/go123/xnet/lonet@v0.0.0-20210302025843-863c4602a230
kirr@deco:~/tmp/trashme/wendelin.core/wcfs$ go1.16 build
/home/kirr/go/pkg/mod/lab.nexedi.com/kirr/go123@v0.0.0-20210302025843-863c4602a230/xnet/lonet/registry_sqlite.go:28:2: missing go.sum entry for module providing package crawshaw.io/sqlite (imported by lab.nexedi.com/kirr/go123/xnet/lonet); to add:
go get lab.nexedi.com/kirr/go123/xnet/lonet@v0.0.0-20210302025843-863c4602a230
/home/kirr/go/pkg/mod/lab.nexedi.com/kirr/go123@v0.0.0-20210302025843-863c4602a230/xnet/lonet/registry_sqlite.go:29:2: missing go.sum entry for module providing package crawshaw.io/sqlite/sqlitex (imported by lab.nexedi.com/kirr/go123/xnet/lonet); to add:
go get lab.nexedi.com/kirr/go123/xnet/lonet@v0.0.0-20210302025843-863c4602a230
/home/kirr/go/pkg/mod/lab.nexedi.com/kirr/neo/go@v0.0.0-20210302031331-91085e39ea86/neo/neonet/misc.go:27:2: missing go.sum entry for module providing package github.com/philhofer/fwd (imported by lab.nexedi.com/kirr/neo/go/neo/neonet); to add:
go get lab.nexedi.com/kirr/neo/go/neo/neonet@v0.0.0-20210302031331-91085e39ea86
kirr@deco:~/tmp/trashme/wendelin.core/wcfs$ go1.15 build
kirr@deco:~/tmp/trashme/wendelin.core/wcfs$ go1.15 get -v lab.nexedi.com/kirr/go123/xnet/lonet@v0.0.0-20210302025843-863c4602a230
go: found lab.nexedi.com/kirr/go123/xnet/lonet in lab.nexedi.com/kirr/go123 v0.0.0-20210302025843-863c4602a230
kirr@deco:~/tmp/trashme/wendelin.core/wcfs$ git st
HEAD отделён на 481ffb8
нечего коммитить, нет изменений в рабочем каталоге
kirr@deco:~/tmp/trashme/wendelin.core/wcfs$ go1.16 build
/home/kirr/go/pkg/mod/lab.nexedi.com/kirr/go123@v0.0.0-20210302025843-863c4602a230/xnet/lonet/registry_sqlite.go:28:2: missing go.sum entry for module providing package crawshaw.io/sqlite (imported by lab.nexedi.com/kirr/go123/xnet/lonet); to add:
go get lab.nexedi.com/kirr/go123/xnet/lonet@v0.0.0-20210302025843-863c4602a230
/home/kirr/go/pkg/mod/lab.nexedi.com/kirr/go123@v0.0.0-20210302025843-863c4602a230/xnet/lonet/registry_sqlite.go:29:2: missing go.sum entry for module providing package crawshaw.io/sqlite/sqlitex (imported by lab.nexedi.com/kirr/go123/xnet/lonet); to add:
go get lab.nexedi.com/kirr/go123/xnet/lonet@v0.0.0-20210302025843-863c4602a230
/home/kirr/go/pkg/mod/lab.nexedi.com/kirr/neo/go@v0.0.0-20210302031331-91085e39ea86/neo/neonet/misc.go:27:2: missing go.sum entry for module providing package github.com/philhofer/fwd (imported by lab.nexedi.com/kirr/neo/go/neo/neonet); to add:
go get lab.nexedi.com/kirr/neo/go/neo/neonet@v0.0.0-20210302031331-91085e39ea86
kirr@deco:~/tmp/trashme/wendelin.core/wcfs$ GO111MODULE=on go1.15 build
kirr@deco:~/tmp/trashme/wendelin.core/wcfs$ go1.16 build
/home/kirr/go/pkg/mod/lab.nexedi.com/kirr/go123@v0.0.0-20210302025843-863c4602a230/xnet/lonet/registry_sqlite.go:28:2: missing go.sum entry for module providing package crawshaw.io/sqlite (imported by lab.nexedi.com/kirr/go123/xnet/lonet); to add:
go get lab.nexedi.com/kirr/go123/xnet/lonet@v0.0.0-20210302025843-863c4602a230
/home/kirr/go/pkg/mod/lab.nexedi.com/kirr/go123@v0.0.0-20210302025843-863c4602a230/xnet/lonet/registry_sqlite.go:29:2: missing go.sum entry for module providing package crawshaw.io/sqlite/sqlitex (imported by lab.nexedi.com/kirr/go123/xnet/lonet); to add:
go get lab.nexedi.com/kirr/go123/xnet/lonet@v0.0.0-20210302025843-863c4602a230
/home/kirr/go/pkg/mod/lab.nexedi.com/kirr/neo/go@v0.0.0-20210302031331-91085e39ea86/neo/neonet/misc.go:27:2: missing go.sum entry for module providing package github.com/philhofer/fwd (imported by lab.nexedi.com/kirr/neo/go/neo/neonet); to add:
go get lab.nexedi.com/kirr/neo/go/neo/neonet@v0.0.0-20210302031331-91085e39ea86
kirr@deco:~/tmp/trashme/wendelin.core/wcfs$ echo $?
1
kirr@deco:~/tmp/trashme/wendelin.core/wcfs$ go1.16 get -t .
kirr@deco:~/tmp/trashme/wendelin.core/wcfs$ git st
HEAD отделён на 481ffb8
нечего коммитить, нет изменений в рабочем каталоге
kirr@deco:~/tmp/trashme/wendelin.core/wcfs$ git diff
kirr@deco:~/tmp/trashme/wendelin.core/wcfs$ go1.16 build
/home/kirr/go/pkg/mod/lab.nexedi.com/kirr/go123@v0.0.0-20210302025843-863c4602a230/xnet/lonet/registry_sqlite.go:28:2: missing go.sum entry for module providing package crawshaw.io/sqlite (imported by lab.nexedi.com/kirr/go123/xnet/lonet); to add:
go get lab.nexedi.com/kirr/go123/xnet/lonet@v0.0.0-20210302025843-863c4602a230
/home/kirr/go/pkg/mod/lab.nexedi.com/kirr/go123@v0.0.0-20210302025843-863c4602a230/xnet/lonet/registry_sqlite.go:29:2: missing go.sum entry for module providing package crawshaw.io/sqlite/sqlitex (imported by lab.nexedi.com/kirr/go123/xnet/lonet); to add:
go get lab.nexedi.com/kirr/go123/xnet/lonet@v0.0.0-20210302025843-863c4602a230
/home/kirr/go/pkg/mod/lab.nexedi.com/kirr/neo/go@v0.0.0-20210302031331-91085e39ea86/neo/neonet/misc.go:27:2: missing go.sum entry for module providing package github.com/philhofer/fwd (imported by lab.nexedi.com/kirr/neo/go/neo/neonet); to add:
go get lab.nexedi.com/kirr/neo/go/neo/neonet@v0.0.0-20210302031331-91085e39ea86
kirr@deco:~/tmp/trashme/wendelin.core/wcfs$ go1.15 version
go version go1.15.8 linux/amd64 # built from go1.15.8-6-gf75ab2d5a6
kirr@deco:~/tmp/trashme/wendelin.core/wcfs$ go1.16 version
go version go1.16 linux/amd64 # built from go1.16-12-g2b7243a62f |
So please change milestone to go1.16.1; thanks. |
@jayconrod here is a sample application, created with Go 1.15 that will not build with Go 1.16 https://github.com/davecheney/issue44129
|
I'm also finding that this seems to be unresolvable. Have got two examples of it here: Tried The only thing which seems to work is setting |
I was able to resolve my project's issue with
It sounds like not everyone is able to resolve it like this, but I wanted to give an update. |
@davecheney, thanks for the self-contained repro. I note that
|
@navytux, using your repro steps and a
[Edit: it does not appear to be a bug. I accidentally ran one command using a It's not at all clear to me why you aren't seeing any changes at all from the suggested
|
@billinghamj, I'm having a hard time seeing the relevance of those links to this issue. Could you post specific steps to reproduce what you're seeing, and/or a link to the specific build logs? (Filing a new issue might be ideal, because it seems pretty clear to me that there are multiple different failure modes being discussed on this one.) |
@navytux, I figured out the I think there is something wrong with your build of the |
@bcmills Sure :) not a huge issue for us any more as we've used the This is the failing build: https://github.com/cuvva/cuvva-public-go/runs/2011625714#step:4:62 And the tree at the time: https://github.com/cuvva/cuvva-public-go/tree/b78beb17ad162d59cdf31d23e37903424513f4f4 Also in my case, on my local machine, installed using the off-the-shelf brew bottle, not from source etc |
Seems to be a dependabot issue for not updating |
@billinghamj, thanks! Looking at the specific error message, and at the contents of cuvva/cuvva-public-go@b78beb1, I think @seankhliao has it right: That particular failure mode looks pretty much exactly like #41103 (CL 251880). So I'm going to guess that your |
@billinghamj, I think what you're seeing is exactly dependabot/dependabot-core#2229 (comment). |
I'm fairly sure that's a separate problem, as the exact same error arises in CI if I run |
Seeing the same issue since 1.16 and
|
Hey folks, it seems like we're seeing multiple bugs here. If If possible, please provide specific instructions to reproduce the problem. A minimal example repo is extraordinarily helpful for us. (This issue is about |
@pauldthomson That seems like a new bug. Would you mind opening another issue? If you can narrow this down to a reproducible example, that would be really helpful. In a test module, I tried importing |
@jayconrod Sure thing. I'll have a go at getting a repro set up and create a new issue. Thanks. |
@bcmills, thanks for feedback. I'm using Go built from source and it is just a regular build from |
With the move to go1.16, we are hitting a go bug for how `go build`/`go test` work with modules - golang/go#44129. This commit adds the `-mod=mod` flag for `go build` and `go test` commands in the smoke test rules (workaround mentioned in the issue).
With the move to go1.16, we are hitting a go bug for how `go build`/`go test` work with modules - golang/go#44129. This commit adds the `-mod=mod` flag for `go build` and `go test` commands in the smoke test rules (workaround mentioned in the issue).
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
The package in the main module should still build after updating one of its transitive imports to a newer, compatible version.
What did you see instead?
When I updated
google.golang.org/protobuf/proto
, it also updated the modulegithub.com/golang/protobuf
due to the minimum version required ingoogle.golang.org/protobuf
. However,github.com/golang/protobuf
is not needed to build any package named on the command line, sogo get
didn't fetch its content or add a hash of its content togo.sum
.The module
github.com/golang/protobuf
is needed to build the package in the current directory, and sincego.sum
doesn't contain a hash for its selected version,go build
fails.A possible solution is that if
go get
changes the selected version of a module and there's a hash for the previous version ingo.sum
,go get
should download the content of the newly selected version and add the hash togo.sum
, possibly removing the hash for the previous version. This would makego get
a bit slower, since it does more work. This won't prevent all errors, since the new version might import packages from other modules we don't have hashes for.cc @bcmills @matloob
The text was updated successfully, but these errors were encountered: