Skip to content

Commit

Permalink
refactor(tools/ispx): migrate to Go 1.23
Browse files Browse the repository at this point in the history
Signed-off-by: Aofei Sheng <[email protected]>
  • Loading branch information
aofei committed Feb 18, 2025
1 parent 15595c8 commit f62c7ef
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 29 deletions.
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ RUN gop build -trimpath -o spx-backend ./cmd/spx-backend
FROM ${GO_BASE_IMAGE} AS go-builder

ARG GOPROXY
# Pre-install Go toolchain for 1.21.3, which will be used by tools/ispx
RUN GOTOOLCHAIN=go1.21.3 go version

WORKDIR /app
COPY tools ./tools
Expand Down
3 changes: 0 additions & 3 deletions tools/ispx/.gitignore

This file was deleted.

8 changes: 0 additions & 8 deletions tools/ispx/.vscode/settings.json

This file was deleted.

3 changes: 2 additions & 1 deletion tools/ispx/build.bat
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
@echo off
setlocal

set GOTOOLCHAIN=go1.23.4
set GOOS=js
set GOARCH=wasm

go build -tags canvas -trimpath -o main.wasm
go build -tags=canvas -trimpath -ldflags=-checklinkname=0 -o main.wasm

endlocal
3 changes: 2 additions & 1 deletion tools/ispx/build.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/sh
set -e

GOTOOLCHAIN=go1.21.3 GOOS=js GOARCH=wasm go build -tags canvas -trimpath -o main.wasm
GOTOOLCHAIN=go1.23.4 GOOS=js GOARCH=wasm go build -tags=canvas -trimpath -ldflags=-checklinkname=0 -o main.wasm
8 changes: 7 additions & 1 deletion tools/ispx/embedded_pkgs.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build js && wasm

package main

//go:generate go run github.com/goplus/igop/cmd/qexp@latest -outdir pkg github.com/goplus/spx
Expand Down Expand Up @@ -69,6 +71,7 @@ import (
_ "github.com/goplus/igop/pkg/io"
_ "github.com/goplus/igop/pkg/io/fs"
_ "github.com/goplus/igop/pkg/io/ioutil"
_ "github.com/goplus/igop/pkg/iter"
_ "github.com/goplus/igop/pkg/log"
_ "github.com/goplus/igop/pkg/log/slog"
_ "github.com/goplus/igop/pkg/maps"
Expand All @@ -77,6 +80,7 @@ import (
_ "github.com/goplus/igop/pkg/math/bits"
_ "github.com/goplus/igop/pkg/math/cmplx"
_ "github.com/goplus/igop/pkg/math/rand"
_ "github.com/goplus/igop/pkg/math/rand/v2"
_ "github.com/goplus/igop/pkg/mime"
_ "github.com/goplus/igop/pkg/net/http"
_ "github.com/goplus/igop/pkg/net/netip"
Expand Down Expand Up @@ -104,6 +108,7 @@ import (
_ "github.com/goplus/igop/pkg/unicode"
_ "github.com/goplus/igop/pkg/unicode/utf16"
_ "github.com/goplus/igop/pkg/unicode/utf8"
_ "github.com/goplus/igop/pkg/unique"

// Excluded stdlib packages.
// _ "github.com/goplus/igop/pkg/container/heap"
Expand Down Expand Up @@ -138,6 +143,7 @@ import (
// _ "github.com/goplus/igop/pkg/go/scanner"
// _ "github.com/goplus/igop/pkg/go/token"
// _ "github.com/goplus/igop/pkg/go/types"
// _ "github.com/goplus/igop/pkg/go/version"
// _ "github.com/goplus/igop/pkg/index/suffixarray"
// _ "github.com/goplus/igop/pkg/log/syslog"
// _ "github.com/goplus/igop/pkg/mime/multipart"
Expand All @@ -158,12 +164,12 @@ import (
// _ "github.com/goplus/igop/pkg/os/exec"
// _ "github.com/goplus/igop/pkg/os/signal"
// _ "github.com/goplus/igop/pkg/os/user"
// _ "github.com/goplus/igop/pkg/plugin"
// _ "github.com/goplus/igop/pkg/runtime/coverage"
// _ "github.com/goplus/igop/pkg/runtime/debug"
// _ "github.com/goplus/igop/pkg/runtime/metrics"
// _ "github.com/goplus/igop/pkg/runtime/pprof"
// _ "github.com/goplus/igop/pkg/runtime/trace"
// _ "github.com/goplus/igop/pkg/structs"
// _ "github.com/goplus/igop/pkg/syscall"
// _ "github.com/goplus/igop/pkg/testing"
// _ "github.com/goplus/igop/pkg/testing/fstest"
Expand Down
12 changes: 6 additions & 6 deletions tools/ispx/go.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module github.com/goplus/builder/ispx

go 1.21
go 1.23.0

require (
github.com/goplus/igop v0.29.0
github.com/goplus/reflectx v1.2.2
github.com/goplus/igop v0.32.1
github.com/goplus/reflectx v1.3.2
github.com/goplus/spx v1.1.1-0.20250205081831-c3f6e69289be
github.com/hajimehoshi/ebiten/v2 v2.8.0-alpha.3
)
Expand All @@ -20,13 +20,13 @@ require (
github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00 // indirect
github.com/goplus/canvas v0.1.0 // indirect
github.com/goplus/gogen v1.16.6 // indirect
github.com/goplus/gop v1.2.6 // indirect
github.com/goplus/mod v0.13.16 // indirect
github.com/goplus/gop v1.3.0 // indirect
github.com/goplus/mod v0.13.17 // indirect
github.com/hajimehoshi/go-mp3 v0.3.4 // indirect
github.com/jezek/xgb v1.1.1 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/qiniu/audio v0.2.1 // indirect
github.com/qiniu/x v1.13.11 // indirect
github.com/qiniu/x v1.13.12 // indirect
github.com/srwiley/oksvg v0.0.0-20210519022825-9fc0c575d5fe // indirect
github.com/srwiley/rasterx v0.0.0-20210519020934-456a8d69b780 // indirect
github.com/timandy/routine v1.1.4 // indirect
Expand Down
15 changes: 8 additions & 7 deletions tools/ispx/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,16 @@ github.com/goplus/gogen v1.16.6 h1:Zwv18HoTbPDk8s2ajxgVeqZE5i4/GMV722KHl6GS8Yk=
github.com/goplus/gogen v1.16.6/go.mod h1:6TQYbabXDF9LCdDkOOzHmfg1R4ENfXQ3XpHa9RhTSD8=
github.com/goplus/gop v1.2.0-pre.1.0.20250112163018-5fb12b1b2972 h1:wA4+I+DDfoNwR+zCnaeckt5pxZgLAuaKvVkC+T9GdiQ=
github.com/goplus/gop v1.2.0-pre.1.0.20250112163018-5fb12b1b2972/go.mod h1:lcW75c0a5v361jId1Vxs4lRrsasWsQDH0k3dG3Z7wH0=
github.com/goplus/igop v0.29.0 h1:25QmbeCLE9At14kd17xSpqP8Xg17Qqz3aGbOwiSfwiY=
github.com/goplus/igop v0.29.0/go.mod h1:V5P0rL4XmOUtAyJAPwYkLjsTZj8r47rO9UMZ+7Djycs=
github.com/goplus/igop v0.32.1 h1:GbI9ThqEUDX9f18jO1xx9NWRb3XnTIgg+byr3JnCpAA=
github.com/goplus/igop v0.32.1/go.mod h1:GCJA4qASZ1IU8MNNgDiW+Yf+eKf2G8fJWrx3arSBm8A=
github.com/goplus/llgo v0.9.9/go.mod h1:udcq+s6tGOdhJq7I8fXPTv4qT2j17/KrlvtcJrMZAoM=
github.com/goplus/llvm v0.8.0/go.mod h1:PeVK8GgzxwAYCiMiUAJb5wJR6xbhj989tu9oulKLLT4=
github.com/goplus/mod v0.13.13/go.mod h1:invR72Rz2+qpOOsXqxz830MX8/aR2GDR2EAow/WgfHI=
github.com/goplus/mod v0.13.15/go.mod h1:invR72Rz2+qpOOsXqxz830MX8/aR2GDR2EAow/WgfHI=
github.com/goplus/mod v0.13.16 h1:tiRk0jszPc66Oh+KBtMZUiTChG9ixzaI4vt7ZZ31HoU=
github.com/goplus/mod v0.13.16/go.mod h1:BsKIBf4PU1am5EgGtA2NV3+/W9cbzWu+9+dwGKj0pgk=
github.com/goplus/reflectx v1.2.2 h1:T1p20OIH/HcnAvQQNnDLwl6AZOjU34icsfc6migD6L8=
github.com/goplus/reflectx v1.2.2/go.mod h1:wHOS9ilbB4zrecI0W1dMmkW9JMcpXV7VjALVbNU9xfM=
github.com/goplus/mod v0.13.17 h1:aWp14xosENrh7t0/0qcIejDmQEiTgI3ou2+KoLDlSlE=
github.com/goplus/mod v0.13.17/go.mod h1:XlHf8mnQ4QkRDX14Of2tpywuHDd+JVpPStvh3egog+0=
github.com/goplus/reflectx v1.3.2 h1:M6JBeENB8CB0F3FnlCpLtIqhAkluuVbCYHFzSrCLF9w=
github.com/goplus/reflectx v1.3.2/go.mod h1:wHOS9ilbB4zrecI0W1dMmkW9JMcpXV7VjALVbNU9xfM=
github.com/goplus/spx v1.1.1-0.20250205081831-c3f6e69289be h1:Gfq4iShKChb7zQreePqekbAQN+3Ow6Qk8qWOTk1cmTY=
github.com/goplus/spx v1.1.1-0.20250205081831-c3f6e69289be/go.mod h1:JjIaVaDVnFasm/bkNHqvtKbd4i1sWScgAf5zPpz4HDw=
github.com/hajimehoshi/ebiten/v2 v2.8.0-alpha.3 h1:cKpQdzW3I+iLID68l25GaxzPZHSZVRdE9/Pz4SOPBR8=
Expand All @@ -66,8 +66,9 @@ github.com/qiniu/oksvg v0.2.0-no-charset h1:KKQg81v52pd5VyaxrF891igoOO50epKfFWkr
github.com/qiniu/oksvg v0.2.0-no-charset/go.mod h1:YCAOS1HFo2kMxfcFCjrJMeo93KGFYaBAKl7LvrAkltQ=
github.com/qiniu/x v1.11.5/go.mod h1:03Ni9tj+N2h2aKnAz+6N0Xfl8FwMEDRC2PAlxekASDs=
github.com/qiniu/x v1.13.10/go.mod h1:INZ2TSWSJVWO/RuELQROERcslBwVgFG7MkTfEdaQz9E=
github.com/qiniu/x v1.13.11 h1:zlFLY9zFXOwKEjx0SQXRBunhFjDVpEY+pRGL/4shd5U=
github.com/qiniu/x v1.13.11/go.mod h1:INZ2TSWSJVWO/RuELQROERcslBwVgFG7MkTfEdaQz9E=
github.com/qiniu/x v1.13.12 h1:UyAwja6dgKUOYWZMzzc02wLodwnZ7wmK/0XzRd0e78g=
github.com/qiniu/x v1.13.12/go.mod h1:INZ2TSWSJVWO/RuELQROERcslBwVgFG7MkTfEdaQz9E=
github.com/srwiley/rasterx v0.0.0-20200120212402-85cb7272f5e9/go.mod h1:mvWM0+15UqyrFKqdRjY6LuAVJR0HOVhJlEgZ5JWtSWU=
github.com/srwiley/rasterx v0.0.0-20210519020934-456a8d69b780 h1:oDMiXaTMyBEuZMU53atpxqYsSB3U1CHkeAu2zr6wTeY=
github.com/srwiley/rasterx v0.0.0-20210519020934-456a8d69b780/go.mod h1:mvWM0+15UqyrFKqdRjY6LuAVJR0HOVhJlEgZ5JWtSWU=
Expand Down

0 comments on commit f62c7ef

Please sign in to comment.