Skip to content

Updating playground should be as easy as go generate, without side-effects. #36

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

Closed
dmitshur opened this issue Oct 18, 2015 · 0 comments
Closed

Comments

@dmitshur
Copy link
Member

Right now, updating the playground requires running the update.sh script in its folder:

https://github.com/gopherjs/gopherjs.github.io/blob/master/playground/update.sh

However, it has a few limitations:

  • It requires your GOROOT to be writeable (without sudo, or to run update.sh with sudo).
  • It requires your GOPATH list to contain no more than 1 workspace.
  • It requires rename command, which can be acquired with brew install rename but if possible, it'd be better not to require it. It can be replaced with a < 50 line Go program inside the repo, that way no external dependencies are needed.
  • It has some non-zero side-effects, for example, it leaves the $GOPATH/bin/playground.js.map file behind and you have to clean it up manually afterwards.

It'd be great to make it so that updating the playground can be done by anyone who has gopherjs installed, even if their GOROOT is not writeable, and if their GOPATH contains multiple workspaces. It should also not have side-effects (having side-effects in a temporary folder is acceptable though).

Filing this to track the issue (I thought I already filed it earlier, but I guess I hadn't).

dmitshur added a commit that referenced this issue Feb 21, 2016
It does require Go to be at /usr/local/go. This can be improved in the
future.

It uses a temporary staging folder to perform the operations.

No longer require your GOROOT to be writeable.

No longer require your GOPATH list to contain no more than 1 workspace.

It has no side-effects, for example, it no longer leaves the
$GOPATH/bin/playground.js.map file behind.

Fixes #36.
dmitshur added a commit that referenced this issue Feb 21, 2016
It does require Go to be at /usr/local/go. This can be improved in the
future.

It uses a temporary staging folder to perform the operations.

-	No longer require your GOROOT to be writeable.
-	No longer require your GOPATH list to contain no more than
	1 workspace.
-	It has no side-effects, for example, it no longer leaves the
	$GOPATH/bin/playground.js.map file behind.

Fixes #36.
dmitshur added a commit that referenced this issue Feb 21, 2016
It uses a temporary staging folder to perform the operations.

-	No longer require your GOROOT to be writeable.
-	No longer require your GOPATH list to contain no more than
	1 workspace.
-	It has no side-effects, for example, it no longer leaves the
	$GOPATH/bin/playground.js.map file behind.

Fixes #36.

It doesn't fix a part of #36, but a new issue #43 is created to track that.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant