Closed myitcv closed 4 years ago
This is, I believe, because js and nosync are fully vendored.
I don't believe that is the case. Only the source code of those packages is embedded, not their built archives. Please see commit message of https://github.com/gopherjs/gopherjs.github.io/commit/cbdec896dfc8a335278926fc7d6a7e2c43ccdb05.
@shurcooL - what do you think is going on here?
I have a hunch. Is your GOROOT directory writeable by user (i.e., can you modify GOROOT contents without having to use sudo
)?
I have a hunch. Is your GOROOT directory writeable by user (i.e., can you modify GOROOT contents without having to use sudo)?
Yes, it is.
That must be why then. The current update.sh
assumes it's not. If it is, GopherJS compiler installs the js.a
and nosync.a
into your GOROOT instead of GOPATH, so lines 33 and 34 won't be able to copy the archives:
I noticed the comment on line 26 is wrong, it should say "GOPATH/pkg" there.
To fix this, we need to find a way of making it work regardless of whether GOROOT is user-writeable or not.
If it is, GopherJS compiler installs the js.a and nosync.a into your GOROOT instead of GOPATH
Out of interest, why does it do that?
That was the behavior Richard implemented about 5 years ago. His GOROOT was user writeable, and he wanted GopherJS to install its archives of the standard library into GOROOT/pkg.
Back then, it would fail to work if GOROOT was not user-writeable.
I prefer my GOROOT not to be user-writeable and not contain any extraneous files, so I reported it as https://github.com/gopherjs/gopherjs/issues/4. Richard worked on a fix that would make GopherJS fall back to writing the standard library archives to GOPATH/pkg if it failed to write to GOROOT/pkg.
That has been the behavior since.
(Later on, I worked on a fix to make it support GOPATH that consisted of more than workspace, see https://github.com/gopherjs/gopherjs/issues/60.)
Also note that this behavior is documented, see last paragraph of https://github.com/gopherjs/gopherjs#installation-and-usage.
Following https://github.com/gopherjs/gopherjs/pull/787 I'm seeing the playground fail to regenerate:
with:
This is, I believe, because
js
andnosync
are fully vendored.@shurcooL - what do you think is going on here?