Skip to content

playground: regenerate with GopherJS 1.12-2 and Go 1.12.13 #72

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

Merged
merged 4 commits into from
Dec 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion playground/internal/imports/gen.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//go:generate go run mkapi.go -output=syscalljs.txt -contexts js-wasm syscall/js
//go:generate go run mkapi.go -output=gopherjs.txt -gopath github.com/gopherjs/gopherjs/js
//go:generate go run mkstdlib.go -output=zstdlib
//go:generate rm gopherjs.txt
//go:generate rm syscalljs.txt gopherjs.txt

package imports
5 changes: 5 additions & 0 deletions playground/internal/imports/mkstdlib.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ func main() {
mustOpen(api("go1.10.txt")),
mustOpen(api("go1.11.txt")),
mustOpen(api("go1.12.txt")),

// The API of the syscall/js package needs to be computed explicitly,
// because it's not included in the GOROOT/api/go1.*.txt files at this time.
mustOpen("syscalljs.txt"),

mustOpen("gopherjs.txt"),
)
sc := bufio.NewScanner(f)
Expand Down
1,420 changes: 719 additions & 701 deletions playground/internal/imports/zstdlib.go

Large diffs are not rendered by default.

Binary file modified playground/pkg/archive/tar.a.js
Binary file not shown.
Binary file modified playground/pkg/archive/zip.a.js
Binary file not shown.
Binary file modified playground/pkg/bufio.a.js
Binary file not shown.
Binary file modified playground/pkg/bytes.a.js
Binary file not shown.
Binary file modified playground/pkg/compress/bzip2.a.js
Binary file not shown.
Binary file modified playground/pkg/compress/flate.a.js
Binary file not shown.
Binary file modified playground/pkg/compress/gzip.a.js
Binary file not shown.
Binary file modified playground/pkg/compress/lzw.a.js
Binary file not shown.
Binary file modified playground/pkg/compress/zlib.a.js
Binary file not shown.
Binary file modified playground/pkg/container/heap.a.js
Binary file not shown.
Binary file modified playground/pkg/container/list.a.js
Binary file not shown.
Binary file modified playground/pkg/container/ring.a.js
Binary file not shown.
Binary file modified playground/pkg/context.a.js
Binary file not shown.
Binary file modified playground/pkg/crypto.a.js
Binary file not shown.
Binary file modified playground/pkg/crypto/aes.a.js
Binary file not shown.
Binary file modified playground/pkg/crypto/cipher.a.js
Binary file not shown.
Binary file modified playground/pkg/crypto/des.a.js
Binary file not shown.
Binary file modified playground/pkg/crypto/dsa.a.js
Binary file not shown.
Binary file modified playground/pkg/crypto/ecdsa.a.js
Binary file not shown.
Binary file modified playground/pkg/crypto/elliptic.a.js
Binary file not shown.
Binary file modified playground/pkg/crypto/hmac.a.js
Binary file not shown.
Binary file modified playground/pkg/crypto/internal/randutil.a.js
Binary file not shown.
Binary file modified playground/pkg/crypto/internal/subtle.a.js
Binary file not shown.
Binary file modified playground/pkg/crypto/md5.a.js
Binary file not shown.
Binary file modified playground/pkg/crypto/rand.a.js
Binary file not shown.
Binary file modified playground/pkg/crypto/rc4.a.js
Binary file not shown.
Binary file modified playground/pkg/crypto/rsa.a.js
Binary file not shown.
Binary file modified playground/pkg/crypto/sha1.a.js
Binary file not shown.
Binary file modified playground/pkg/crypto/sha256.a.js
Binary file not shown.
Binary file modified playground/pkg/crypto/sha512.a.js
Binary file not shown.
Binary file modified playground/pkg/crypto/subtle.a.js
Binary file not shown.
Binary file modified playground/pkg/crypto/tls.a.js
Binary file not shown.
Binary file modified playground/pkg/crypto/x509.a.js
Binary file not shown.
Binary file modified playground/pkg/crypto/x509/pkix.a.js
Binary file not shown.
Binary file modified playground/pkg/database/sql/driver.a.js
Binary file not shown.
Binary file modified playground/pkg/debug/dwarf.a.js
Binary file not shown.
Binary file modified playground/pkg/debug/gosym.a.js
Binary file not shown.
Binary file modified playground/pkg/debug/pe.a.js
Binary file not shown.
Binary file modified playground/pkg/encoding.a.js
Binary file not shown.
Binary file modified playground/pkg/encoding/ascii85.a.js
Binary file not shown.
Binary file modified playground/pkg/encoding/asn1.a.js
Binary file not shown.
Binary file modified playground/pkg/encoding/base32.a.js
Binary file not shown.
Binary file modified playground/pkg/encoding/base64.a.js
Binary file not shown.
Binary file modified playground/pkg/encoding/binary.a.js
Binary file not shown.
Binary file modified playground/pkg/encoding/csv.a.js
Binary file not shown.
Binary file modified playground/pkg/encoding/gob.a.js
Binary file not shown.
Binary file modified playground/pkg/encoding/hex.a.js
Binary file not shown.
Binary file modified playground/pkg/encoding/json.a.js
Binary file not shown.
Binary file modified playground/pkg/encoding/pem.a.js
Binary file not shown.
Binary file modified playground/pkg/encoding/xml.a.js
Binary file not shown.
Binary file modified playground/pkg/errors.a.js
Binary file not shown.
Binary file modified playground/pkg/flag.a.js
Binary file not shown.
Binary file modified playground/pkg/fmt.a.js
Binary file not shown.
Binary file modified playground/pkg/github.com/gopherjs/gopherjs/js.a.js
Binary file not shown.
Binary file modified playground/pkg/github.com/gopherjs/gopherjs/nosync.a.js
Binary file not shown.
Binary file modified playground/pkg/go/ast.a.js
Binary file not shown.
Binary file modified playground/pkg/go/doc.a.js
Binary file not shown.
Binary file modified playground/pkg/go/format.a.js
Binary file not shown.
Binary file modified playground/pkg/go/parser.a.js
Binary file not shown.
Binary file modified playground/pkg/go/printer.a.js
Binary file not shown.
Binary file modified playground/pkg/go/scanner.a.js
Binary file not shown.
Binary file modified playground/pkg/go/token.a.js
Binary file not shown.
Binary file modified playground/pkg/hash.a.js
Binary file not shown.
Binary file modified playground/pkg/hash/adler32.a.js
Binary file not shown.
Binary file modified playground/pkg/hash/crc32.a.js
Binary file not shown.
Binary file modified playground/pkg/hash/crc64.a.js
Binary file not shown.
Binary file modified playground/pkg/hash/fnv.a.js
Binary file not shown.
Binary file modified playground/pkg/html.a.js
Binary file not shown.
Binary file modified playground/pkg/html/template.a.js
Binary file not shown.
Binary file modified playground/pkg/image.a.js
Binary file not shown.
Binary file modified playground/pkg/image/color.a.js
Binary file not shown.
Binary file modified playground/pkg/image/color/palette.a.js
Binary file not shown.
Binary file modified playground/pkg/image/draw.a.js
Binary file not shown.
Binary file modified playground/pkg/image/gif.a.js
Binary file not shown.
Binary file modified playground/pkg/image/internal/imageutil.a.js
Binary file not shown.
Binary file modified playground/pkg/image/jpeg.a.js
Binary file not shown.
Binary file modified playground/pkg/image/png.a.js
Binary file not shown.
Binary file modified playground/pkg/index/suffixarray.a.js
Binary file not shown.
Binary file modified playground/pkg/internal/bytealg.a.js
Binary file not shown.
Binary file modified playground/pkg/internal/cpu.a.js
Binary file not shown.
Binary file modified playground/pkg/internal/fmtsort.a.js
Binary file not shown.
Binary file modified playground/pkg/internal/nettrace.a.js
Binary file not shown.
Binary file modified playground/pkg/internal/poll.a.js
Binary file not shown.
Binary file modified playground/pkg/internal/race.a.js
Binary file not shown.
Binary file modified playground/pkg/internal/singleflight.a.js
Binary file not shown.
Binary file modified playground/pkg/internal/syscall/unix.a.js
Binary file not shown.
Binary file modified playground/pkg/internal/testlog.a.js
Binary file not shown.
Binary file modified playground/pkg/internal/x/crypto/chacha20poly1305.a.js
Binary file not shown.
Binary file modified playground/pkg/internal/x/crypto/cryptobyte.a.js
Binary file not shown.
Binary file modified playground/pkg/internal/x/crypto/cryptobyte/asn1.a.js
Binary file not shown.
Binary file modified playground/pkg/internal/x/crypto/curve25519.a.js
Binary file not shown.
Binary file modified playground/pkg/internal/x/crypto/hkdf.a.js
Binary file not shown.
Binary file modified playground/pkg/internal/x/crypto/internal/chacha20.a.js
Binary file not shown.
Binary file modified playground/pkg/internal/x/crypto/poly1305.a.js
Binary file not shown.
Binary file modified playground/pkg/internal/x/net/dns/dnsmessage.a.js
Binary file not shown.
Binary file modified playground/pkg/internal/x/net/http/httpguts.a.js
Binary file not shown.
Binary file modified playground/pkg/internal/x/net/http/httpproxy.a.js
Binary file not shown.
Binary file modified playground/pkg/internal/x/net/http2/hpack.a.js
Binary file not shown.
Binary file modified playground/pkg/internal/x/net/idna.a.js
Binary file not shown.
Binary file modified playground/pkg/internal/x/net/route.a.js
Binary file not shown.
Binary file modified playground/pkg/internal/x/text/secure/bidirule.a.js
Binary file not shown.
Binary file modified playground/pkg/internal/x/text/transform.a.js
Binary file not shown.
Binary file modified playground/pkg/internal/x/text/unicode/bidi.a.js
Binary file not shown.
Binary file modified playground/pkg/internal/x/text/unicode/norm.a.js
Binary file not shown.
Binary file modified playground/pkg/io.a.js
Binary file not shown.
Binary file modified playground/pkg/io/ioutil.a.js
Binary file not shown.
Binary file modified playground/pkg/log.a.js
Binary file not shown.
Binary file modified playground/pkg/math.a.js
Binary file not shown.
Binary file modified playground/pkg/math/big.a.js
Binary file not shown.
Binary file modified playground/pkg/math/bits.a.js
Binary file not shown.
Binary file modified playground/pkg/math/cmplx.a.js
Binary file not shown.
Binary file modified playground/pkg/math/rand.a.js
Binary file not shown.
Binary file modified playground/pkg/mime.a.js
Binary file not shown.
Binary file modified playground/pkg/mime/multipart.a.js
Binary file not shown.
Binary file modified playground/pkg/mime/quotedprintable.a.js
Binary file not shown.
Binary file modified playground/pkg/net.a.js
Binary file not shown.
Binary file modified playground/pkg/net/http.a.js
Binary file not shown.
Binary file modified playground/pkg/net/http/cgi.a.js
Binary file not shown.
Binary file modified playground/pkg/net/http/cookiejar.a.js
Binary file not shown.
Binary file modified playground/pkg/net/http/fcgi.a.js
Binary file not shown.
Binary file modified playground/pkg/net/http/httptest.a.js
Binary file not shown.
Binary file modified playground/pkg/net/http/httptrace.a.js
Binary file not shown.
Binary file modified playground/pkg/net/http/httputil.a.js
Binary file not shown.
Binary file modified playground/pkg/net/http/internal.a.js
Binary file not shown.
Binary file modified playground/pkg/net/mail.a.js
Binary file not shown.
Binary file modified playground/pkg/net/smtp.a.js
Binary file not shown.
Binary file modified playground/pkg/net/textproto.a.js
Binary file not shown.
Binary file modified playground/pkg/net/url.a.js
Binary file not shown.
Binary file modified playground/pkg/os.a.js
Binary file not shown.
Binary file modified playground/pkg/os/exec.a.js
Binary file not shown.
Binary file modified playground/pkg/os/user.a.js
Binary file not shown.
Binary file modified playground/pkg/path.a.js
Binary file not shown.
Binary file modified playground/pkg/path/filepath.a.js
Binary file not shown.
Binary file modified playground/pkg/reflect.a.js
Binary file not shown.
Binary file modified playground/pkg/regexp.a.js
Binary file not shown.
Binary file modified playground/pkg/regexp/syntax.a.js
Binary file not shown.
Binary file modified playground/pkg/runtime.a.js
Binary file not shown.
Binary file modified playground/pkg/runtime/debug.a.js
Binary file not shown.
Binary file modified playground/pkg/runtime/internal/sys.a.js
Binary file not shown.
Binary file modified playground/pkg/runtime/trace.a.js
Binary file not shown.
Binary file modified playground/pkg/sort.a.js
Binary file not shown.
Binary file modified playground/pkg/strconv.a.js
Binary file not shown.
Binary file modified playground/pkg/strings.a.js
Binary file not shown.
Binary file modified playground/pkg/sync.a.js
Binary file not shown.
Binary file modified playground/pkg/sync/atomic.a.js
Binary file not shown.
Binary file modified playground/pkg/syscall.a.js
Binary file not shown.
Binary file added playground/pkg/syscall/js.a.js
Binary file not shown.
Binary file modified playground/pkg/testing.a.js
Binary file not shown.
Binary file modified playground/pkg/testing/iotest.a.js
Binary file not shown.
Binary file modified playground/pkg/testing/quick.a.js
Binary file not shown.
Binary file modified playground/pkg/text/scanner.a.js
Binary file not shown.
Binary file modified playground/pkg/text/tabwriter.a.js
Binary file not shown.
Binary file modified playground/pkg/text/template.a.js
Binary file not shown.
Binary file modified playground/pkg/text/template/parse.a.js
Binary file not shown.
Binary file modified playground/pkg/time.a.js
Binary file not shown.
Binary file modified playground/pkg/unicode.a.js
Binary file not shown.
Binary file modified playground/pkg/unicode/utf16.a.js
Binary file not shown.
Binary file modified playground/pkg/unicode/utf8.a.js
Binary file not shown.
2 changes: 1 addition & 1 deletion playground/playground.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func main() {
})
}()
} else {
scope.Set("code", "package main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/gopherjs/gopherjs/js\"\n)\n\nfunc main() {\n\tfmt.Println(\"Hello, playground\")\n\tjs.Global.Call(\"alert\", \"Hello, JavaScript\")\n\tprintln(\"Hello, JS console\")\n}\n")
scope.Set("code", "package main\n\nimport (\n\t\"fmt\"\n\t\"syscall/js\"\n)\n\nfunc main() {\n\tfmt.Println(\"Hello, playground\")\n\tjs.Global().Call(\"alert\", \"Hello, JavaScript\")\n\tprintln(\"Hello, JS console\")\n}\n")
close(codeReady)
}
scope.Set("imports", true)
Expand Down
28 changes: 14 additions & 14 deletions playground/playground.js

Large diffs are not rendered by default.

30 changes: 23 additions & 7 deletions playground/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,33 +10,48 @@ cleanup() {

trap cleanup EXIT HUP INT TERM

# This script relies on GOPATH mode. The GOPATH workspace
# must contain both github.com/gopherjs/gopherjs and
# github.com/gopherjs/gopherjs.github.io repositories.
export GO111MODULE=off

go install github.com/gopherjs/gopherjs/...

go generate github.com/gopherjs/gopherjs.github.io/playground/internal/imports

# Build playground itself.
gopherjs build -m

# The GOPATH workspace where the GopherJS project is.
gopherjsgopath=$(go list -f '{{.Root}}' github.com/gopherjs/gopherjs)

rm -rf pkg/
# Make a copy of GOROOT that is non-user-writable,
# to prevent any GopherJS packages being written to it for now.
echo "copying GOROOT from $(go env GOROOT) to $tmp/goroot"
cp -a "$(go env GOROOT)" "$tmp/goroot"
echo "making our copy of GOROOT non-user-writable for now"
chmod -R -w "$tmp/goroot"
export GOROOT="$tmp/goroot"
unset GOPHERJS_GOROOT # force $GOROOT to be used

# Build playground itself.
gopherjs build -m

# Use an empty GOPATH workspace with just gopherjs,
# so that all the standard library packages get written to GOROOT/pkg.
export GOPATH="$tmp/gopath"
mkdir -p "$GOPATH"/src/github.com/gopherjs/gopherjs
cp -a "$gopherjsgopath"/src/github.com/gopherjs/gopherjs/* "$GOPATH"/src/github.com/gopherjs/gopherjs

rm -rf pkg/

gopherjs install -m github.com/gopherjs/gopherjs/js github.com/gopherjs/gopherjs/nosync
mkdir -p pkg/github.com/gopherjs/gopherjs
cp "$GOPATH"/pkg/*_js_min/github.com/gopherjs/gopherjs/js.a pkg/github.com/gopherjs/gopherjs/js.a
cp "$GOPATH"/pkg/*_js_min/github.com/gopherjs/gopherjs/nosync.a pkg/github.com/gopherjs/gopherjs/nosync.a

# Make a copy of GOROOT that is user-writeable,
# Make our GOROOT copy user-writable now, then
# use it to build and copy out standard library packages.
cp -a "$(go env GOROOT)" "$tmp/goroot"
export GOROOT="$tmp/goroot"
echo "making our copy of GOROOT user-writable again"
chmod -R u+w "$tmp/goroot"

gopherjs install -m \
archive/tar \
archive/zip \
Expand Down Expand Up @@ -125,6 +140,7 @@ gopherjs install -m \
strconv \
strings \
sync/atomic \
syscall/js \
testing \
testing/iotest \
testing/quick \
Expand Down