Skip to content

Wrongly reusing cached precompiled code when changing build tags #440

Closed
@simen

Description

@simen

I have a package that needs to run both on the native server and in a js client. I use build tags to omit code that rely on huge libraries like reflect, time and fmt. I had some very inconsistent results today where unused libraries would stick around even after I was completely sure I had excised them.

It turns out the problem was that gopherjs was reusing cached precompiled packages from $GOPATH/pkg/darwin_js and $GOPATH/pkg/darwin_js_min. When I deleted these directories and recompiled, everything worked as expected.

Easily worked around when you know it, but should probably be fixed at some point?

Metadata

Metadata

Assignees

No one assigned

    Labels

    buggopherjs-toolRelated to the gopherjs tool or its build system (but not the compiler itself).

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions