Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0aede16

Browse filesBrowse files
committed
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 github.com/gopherjs/gopherjs.github.io/playground/internal/imports Updates golang/go#27590
1 parent 353fe54 commit 0aede16
Copy full SHA for 0aede16

File tree

3 files changed

+726
-702
lines changed
Filter options

3 files changed

+726
-702
lines changed

‎playground/internal/imports/gen.go

Copy file name to clipboard
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
//go:generate go run mkapi.go -output=syscalljs.txt -contexts js-wasm syscall/js
12
//go:generate go run mkapi.go -output=gopherjs.txt -gopath github.com/gopherjs/gopherjs/js
23
//go:generate go run mkstdlib.go -output=zstdlib
3-
//go:generate rm gopherjs.txt
4+
//go:generate rm syscalljs.txt gopherjs.txt
45

56
package imports

‎playground/internal/imports/mkstdlib.go

Copy file name to clipboardExpand all lines: playground/internal/imports/mkstdlib.go
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ func main() {
6969
mustOpen(api("go1.10.txt")),
7070
mustOpen(api("go1.11.txt")),
7171
mustOpen(api("go1.12.txt")),
72+
73+
// The API of the syscall/js package needs to be computed explicitly,
74+
// because it's not included in the GOROOT/api/go1.*.txt files at this time.
75+
mustOpen("syscalljs.txt"),
76+
7277
mustOpen("gopherjs.txt"),
7378
)
7479
sc := bufio.NewScanner(f)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.