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/vet: "cannot import, possibly version skew" regression #25596

somersf opened this issue May 27, 2018 · 3 comments


None yet
6 participants
Copy link

commented May 27, 2018

What version of Go are you using (go version)?

Tested using

$ go version
go version devel +c1d9d1f305 Sun May 27 07:33:08 2018 +0000 darwin/amd64


$ go version
go version go1.10.2 darwin/amd64

Does this issue reproduce with the latest release?

go1.10.2 and earlier releases do not fail the go vet check.

What operating system and processor architecture are you using (go env)?

Tested on:

  • GOOS=darwin GOARCH=amd64
  • GOOS=linux GOARCH=amd64

What did you do?

A recent change on master has caused go vet to report an error (..."cannot import, possibly version skew"...) on code that previously passed with go1.10.2, and go-devel versions until recently.

Multiple packages seem to be required - at least in the example I distilled:

Create $GOPATH/src/issue/a/a.go:

package a

type Entry interface {
        Writable() WritableEntry

type WritableEntry interface {

Create $GOPATH/src/issue/b/b.go:

package b

import "issue/a"

var v a.Entry

Then run:

$ go vet issue/...

What did you expect to see?

go vet should not report any errors.

What did you see instead?

go vet reports:

# issue/b
b/b.go:3:8: could not import issue/a (cannot import, possibly version skew (embedded type is not an interface) - reinstall package)
vet: typecheck failures

Additional information

Bisecting the go project commits since this last passed with go-devel, indicates that the regression appeared with commit c730a93

Author: Robert Griesemer <redacted>
Date:   Wed May 23 16:35:56 2018 -0700

    go/types: permit embedding of non-defined interfaces via alias type names

This comment has been minimized.

Copy link

commented May 27, 2018

(I am able to reproduce the vet error on darwin/amd64)


@agnivade agnivade changed the title go vet "cannot import, possibly version skew" regression cmd/vet: "cannot import, possibly version skew" regression May 28, 2018

@agnivade agnivade added this to the Go1.11 milestone May 28, 2018


This comment has been minimized.

Copy link

commented May 28, 2018

From a cursory glance, this looks to be because issue/a.Entry is not complete yet, i.e. it's Underlying() is nil. But I've not looked any further than that...


This comment has been minimized.

Copy link

commented May 29, 2018

Change mentions this issue: go/types: don't over-eagerly verify embedded interfaces

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.