Skip to content

Latest version doesn't build, GopherJS needs to update go/types import paths. #373

Closed
@dmitshur

Description

@dmitshur

Trying to go get -u GopherJS right now fails:

$ go get -u github.com/gopherjs/gopherjs
# github.com/gopherjs/gopherjs/compiler
github.com/gopherjs/gopherjs/compiler/utils.go:342: cannot use ty (type "golang.org/x/tools/go/types".Type) as type "go/types".Type in argument to c.p.anonTypeMap.At:
    "golang.org/x/tools/go/types".Type 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/gopherjs/gopherjs/compiler/utils.go:348: cannot use ty (type "golang.org/x/tools/go/types".Type) as type "go/types".Type in argument to c.p.anonTypeMap.Set:
    "golang.org/x/tools/go/types".Type 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

This is because GopherJS (and all Go projects still using golang.org/x/tools/go/types) needs to be updated to use the go/types and related packages in Go standard library. This applies when building using Go 1.5, which GopherJS requires.

This is normal. See https://groups.google.com/forum/#!topic/golang-announce/qu_rAphYdxY for details and the announced deprecation plan.

The relevant upstream change is https://go-review.googlesource.com/#/c/18207/.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions