Skip to content
Browse files

playground/internal/imports: add syscall/js identifiers

GopherJS 1.12-2 has added support for syscall/js package,
so it should be available as part of imports.

The syscall/js API is not included in the GOROOT/api/go1.*.txt files
at this time, and so it needs to be added to mkstdlib.go explicitly.
Use the mkapi.go program to determine the syscall/js API.

Regenerate zstdlib.go with the updated generator, using Go 1.12.13:

	go1.12.13 generate

Updates golang/go#27590
  • Loading branch information
dmitshur committed Dec 1, 2019
1 parent 353fe54 commit 0aede165a0e2bf1c24d34d06c1d02dedd9dc53e1
Showing with 726 additions and 702 deletions.
  1. +2 −1 playground/internal/imports/gen.go
  2. +5 −0 playground/internal/imports/mkstdlib.go
  3. +719 −701 playground/internal/imports/zstdlib.go
@@ -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
//go:generate go run mkstdlib.go -output=zstdlib
//go:generate rm gopherjs.txt
//go:generate rm syscalljs.txt gopherjs.txt

package imports
@@ -69,6 +69,11 @@ func main() {

// 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.

sc := bufio.NewScanner(f)

0 comments on commit 0aede16

Please sign in to comment.
You can’t perform that action at this time.