Skip to content

Unable to rebuild/update playground. #27

Closed
@dmitshur

Description

@dmitshur

If I'm not mistaken, it seems the playground is in a broken state if one tries to rebuild it. I suspect it's a result of changing importer/exporter in gopherjs/gopherjs@d60db54.

When I rebuild/update the playground using the latest version of GopherJS, I get Uncaught Error: AddInt32 already declared panics when the playground loads.

I was able to get around that temporarily by making the following change to golang.org/x/tools/go/importer package, importer.go file:

if alt := pkg.Scope().Insert(obj); alt != nil {
    //panic(fmt.Sprintf("%s already declared", alt.Name()))
    println(fmt.Sprintf("%s already declared", alt.Name()))
}

That way the playground seems to work, but it does print the above warning quite a few times, seemingly for all exported symbols in sync/atomic and unicode packages (no idea why those specifically).

It is possible I messed something up with the update.sh script since I had to do its steps manually (since my GOROOT is not user-writeable, I have multiple GOPATH workspaces, etc.), but I double checked very carefully so the chance is quite low. I think it's a legitimate issue. I wasn't able to investigate it much further because I'm not very familiar with golang.org/x/tools/go/importer package at this time.

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