Skip to content

cmd/vet: "cannot import, possibly version skew" regression #25596

Closed
@somersf

Description

@somersf

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

and

$ 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 {
        Entry
}

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.SoonThis needs action soon. (recent regressions, service outages, unusual time-sensitive situations)release-blocker

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions