mvdan/interfacer

Package does not compile anymore with Go 1.5

Closed this issue · 2 comments

$ go get github.com/mvdan/interfacer
# github.com/mvdan/interfacer
github.com/mvdan/interfacer/check.go:66: cannot use info.Pkg (type *"go/types".Package) as type *"golang.org/x/tools/go/types".Package in assignment
github.com/mvdan/interfacer/check.go:112: cannot use pkg (type *"golang.org/x/tools/go/types".Package) as type *"go/types".Package in map index
github.com/mvdan/interfacer/check.go:174: impossible type assertion:
    *"golang.org/x/tools/go/types".Var does not implement "go/types".Object (wrong type for Parent method)
        have Parent() *"golang.org/x/tools/go/types".Scope
        want Parent() *"go/types".Scope
github.com/mvdan/interfacer/check.go:251: impossible type assertion:
    *"golang.org/x/tools/go/types".Signature does not implement "go/types".Type (wrong type for Underlying method)
        have Underlying() "golang.org/x/tools/go/types".Type
        want Underlying() "go/types".Type
github.com/mvdan/interfacer/check.go:256: impossible type assertion:
    *"golang.org/x/tools/go/types".Signature does not implement "go/types".Type (wrong type for Underlying method)
        have Underlying() "golang.org/x/tools/go/types".Type
        want Underlying() "go/types".Type
github.com/mvdan/interfacer/check.go:312: cannot use v.PackageInfo.Info.Types[left].Type (type "go/types".Type) as type "golang.org/x/tools/go/types".Type in argument to v.addUsed:
    "go/types".Type does not implement "golang.org/x/tools/go/types".Type (wrong type for Underlying method)
        have Underlying() "go/types".Type
        want Underlying() "golang.org/x/tools/go/types".Type
github.com/mvdan/interfacer/check.go:321: cannot use v.PackageInfo.Info.TypeOf(kv.Value) (type "go/types".Type) as type "golang.org/x/tools/go/types".Type in argument to v.addUsed:
    "go/types".Type does not implement "golang.org/x/tools/go/types".Type (wrong type for Underlying method)
        have Underlying() "go/types".Type
        want Underlying() "golang.org/x/tools/go/types".Type
github.com/mvdan/interfacer/check.go:324: cannot use v.PackageInfo.Info.TypeOf(kv.Key) (type "go/types".Type) as type "golang.org/x/tools/go/types".Type in argument to v.addUsed:
    "go/types".Type does not implement "golang.org/x/tools/go/types".Type (wrong type for Underlying method)
        have Underlying() "go/types".Type
        want Underlying() "golang.org/x/tools/go/types".Type
github.com/mvdan/interfacer/check.go:337: impossible type assertion:
    *"golang.org/x/tools/go/types".Signature does not implement "go/types".Type (wrong type for Underlying method)
        have Underlying() "golang.org/x/tools/go/types".Type
        want Underlying() "go/types".Type

I guess it is caused by alandonovan's commits on golang/tools on January 6th: https://github.com/golang/tools/commits/master

mvdan commented

You're right. Thanks for spotting!

I should really set up vendoring, but I want to force myself to closely follow what happens with go/loader.

Thanks!