-
Notifications
You must be signed in to change notification settings - Fork 11
playground: go generate fails when GOROOT is user-writeable. #69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
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 cbdec89.
I have a hunch. Is your GOROOT directory writeable by user (i.e., can you modify GOROOT contents without having to use |
Yes, it is. |
That must be why then. The current gopherjs.github.io/playground/update.sh Lines 25 to 34 in cbdec89
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. |
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 gopherjs/gopherjs#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 gopherjs/gopherjs#60.) |
Also note that this behavior is documented, see last paragraph of https://github.com/gopherjs/gopherjs#installation-and-usage. |
Also modify the default "hello world" snippet to use it, since it's a more general API. Modernize update.sh slightly to handle variability in environments better. Updates #69
Previously, the script relied on GOROOT not being user-writable and failed when that wasn't the case. This change makes it succeed in both cases. Fixes #69
Also modify the default "hello world" snippet to use it, since it's a more general API. Modernize update.sh slightly to handle variability in environments better. Updates #69
Previously, the script relied on GOROOT not being user-writable and failed when that wasn't the case. This change makes it succeed in both cases. Fixes #69
Following gopherjs/gopherjs#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?
The text was updated successfully, but these errors were encountered: