From dcd3516002dfdd6226a7e4d2177c249c10e2d57e Mon Sep 17 00:00:00 2001 From: Paul Jolly Date: Fri, 23 Feb 2024 05:18:22 +0000 Subject: [PATCH] deps: update to depend on the cuelang.org/go@v0.7.1 Also bump the Go version used by the repo to go1.22.0 while we are here. We also drop the unused latestStableGo field from our repo config package. The remainder of this change made by running: go get cuelang.org/go@v0.7.1 go mod tidy go generate ./... in / and /play using go1.22.0. Signed-off-by: Paul Jolly Change-Id: I58a5560791b102c1f70a73400850554581c8d2e2 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cuelang.org/+/1177281 TryBot-Result: CUEcueckoo Reviewed-by: Jonathan Matthews --- .github/workflows/trybot.yml | 10 +++++----- .github/workflows/update_tip.yml | 6 +++--- content/en/docs/tutorials/kubernetes.md | 2 +- content/en/pkg.go.dev.md | 2 +- go.mod | 2 +- go.sum | 4 ++-- internal/ci/repo/repo.cue | 6 +----- netlify.toml | 2 +- play/go.mod | 2 +- play/go.sum | 4 ++-- play/src/components/gen_cuelang_org_go_version.ts | 2 +- play/src/wasm_exec.js | 11 +++++++++-- 12 files changed, 28 insertions(+), 25 deletions(-) diff --git a/.github/workflows/trybot.yml b/.github/workflows/trybot.yml index 8c1771c8b..4e10748c4 100644 --- a/.github/workflows/trybot.yml +++ b/.github/workflows/trybot.yml @@ -127,7 +127,7 @@ jobs: uses: actions/setup-go@v4 with: cache: false - go-version: 1.20.6 + go-version: 1.22.0 - name: Install Hugo uses: peaceiris/actions-hugo@v2 with: @@ -147,8 +147,8 @@ jobs: path: |- ${{ steps.go-mod-cache-dir.outputs.dir }}/cache/download ${{ steps.go-cache-dir.outputs.dir }} - key: Linux-1.20.6-${{ github.run_id }} - restore-keys: Linux-1.20.6 + key: Linux-1.22.0-${{ github.run_id }} + restore-keys: Linux-1.22.0 - if: |- ! (((github.ref == 'refs/heads/master' || github.ref == 'refs/heads/alpha') && (! (contains(github.event.head_commit.message, ' Dispatch-Trailer: {"type":"')))) || (github.ref == 'refs/heads/ci/test')) @@ -157,8 +157,8 @@ jobs: path: |- ${{ steps.go-mod-cache-dir.outputs.dir }}/cache/download ${{ steps.go-cache-dir.outputs.dir }} - key: Linux-1.20.6-${{ github.run_id }} - restore-keys: Linux-1.20.6 + key: Linux-1.22.0-${{ github.run_id }} + restore-keys: Linux-1.22.0 - if: |- github.repository == 'cue-lang/cuelang.org' && (((github.ref == 'refs/heads/master' || github.ref == 'refs/heads/alpha') && (! (contains(github.event.head_commit.message, ' Dispatch-Trailer: {"type":"')))) || github.ref == 'refs/heads/ci/test') diff --git a/.github/workflows/update_tip.yml b/.github/workflows/update_tip.yml index 9520f6c41..7964416f1 100644 --- a/.github/workflows/update_tip.yml +++ b/.github/workflows/update_tip.yml @@ -74,7 +74,7 @@ jobs: uses: actions/setup-go@v4 with: cache: false - go-version: 1.20.6 + go-version: 1.22.0 - name: Install Hugo uses: peaceiris/actions-hugo@v2 with: @@ -91,8 +91,8 @@ jobs: path: |- ${{ steps.go-mod-cache-dir.outputs.dir }}/cache/download ${{ steps.go-cache-dir.outputs.dir }} - key: Linux-1.20.6-${{ github.run_id }} - restore-keys: Linux-1.20.6 + key: Linux-1.22.0-${{ github.run_id }} + restore-keys: Linux-1.22.0 - name: Tip dist run: ./build.bash env: diff --git a/content/en/docs/tutorials/kubernetes.md b/content/en/docs/tutorials/kubernetes.md index 4cb758c17..7c95dfeca 100644 --- a/content/en/docs/tutorials/kubernetes.md +++ b/content/en/docs/tutorials/kubernetes.md @@ -1,4 +1,4 @@ --- type: redirect -redirectURL: https://github.com/cue-lang/cue/blob/v0.7.0/doc/tutorial/kubernetes/README.md +redirectURL: https://github.com/cue-lang/cue/blob/v0.7.1/doc/tutorial/kubernetes/README.md --- \ No newline at end of file diff --git a/content/en/pkg.go.dev.md b/content/en/pkg.go.dev.md index 85fee4ff5..cdb0d82ec 100644 --- a/content/en/pkg.go.dev.md +++ b/content/en/pkg.go.dev.md @@ -1,4 +1,4 @@ --- type: redirect -redirectURL: https://pkg.go.dev/cuelang.org/go@v0.7.0 +redirectURL: https://pkg.go.dev/cuelang.org/go@v0.7.1 --- \ No newline at end of file diff --git a/go.mod b/go.mod index e0e2d6638..e55a0c798 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/cue-lang/cuelang.org go 1.20 require ( - cuelang.org/go v0.7.0 + cuelang.org/go v0.7.1 github.com/apex/gateway v1.1.2 github.com/aws/aws-lambda-go v1.32.1 github.com/rogpeppe/testscript v1.1.0 diff --git a/go.sum b/go.sum index be27fe194..93093586f 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,6 @@ cuelabs.dev/go/oci/ociregistry v0.0.0-20231103182354-93e78c079a13 h1:zkiIe8AxZ/kDjqQN+mDKc5BxoVJOqioSdqApjc+eB1I= -cuelang.org/go v0.7.0 h1:gMztinxuKfJwMIxtboFsNc6s8AxwJGgsJV+3CuLffHI= -cuelang.org/go v0.7.0/go.mod h1:ix+3dM/bSpdG9xg6qpCgnJnpeLtciZu+O/rDbywoMII= +cuelang.org/go v0.7.1 h1:wSuUSIKR9M1yrph57l8EJATWVRWHaq/Zd0dFUL10PC8= +cuelang.org/go v0.7.1/go.mod h1:ix+3dM/bSpdG9xg6qpCgnJnpeLtciZu+O/rDbywoMII= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/apex/gateway v1.1.2 h1:OWyLov8eaau8YhkYKkRuOAYqiUhpBJalBR1o+3FzX+8= github.com/apex/gateway v1.1.2/go.mod h1:AMTkVbz5u5Hvd6QOGhhg0JUrNgCcLVu3XNJOGntdoB4= diff --git a/internal/ci/repo/repo.cue b/internal/ci/repo/repo.cue index 48ee18601..f171df101 100644 --- a/internal/ci/repo/repo.cue +++ b/internal/ci/repo/repo.cue @@ -19,14 +19,10 @@ botGitHubUserEmail: "cueckoo@gmail.com" linuxMachine: "ubuntu-22.04" -// Use the latest Go version for extra checks, -// such as running tests with the data race detector. -latestStableGo: "1.20.x" - // Use a specific latest version for release builds. // Note that we don't want ".x" for the sake of reproducibility, // so we instead pin a specific Go release. -goVersion: "1.20.6" +goVersion: "1.22.0" // Use a specific version of NodeJS for deploy purposes. This version // is consistent between netlify and GitHub Actions usage. diff --git a/netlify.toml b/netlify.toml index f9e71b2e5..0df5cdc2c 100644 --- a/netlify.toml +++ b/netlify.toml @@ -6,7 +6,7 @@ command = "bash build.bash" [build.environment] -GO_VERSION = "1.20.6" +GO_VERSION = "1.22.0" HUGO_ENV = "production" HUGO_VERSION = "0.115.4" NODE_VERSION = "18.17.0" diff --git a/play/go.mod b/play/go.mod index fadb60c69..0f655bfd5 100644 --- a/play/go.mod +++ b/play/go.mod @@ -3,7 +3,7 @@ module github.com/cue-sh/playground go 1.20 require ( - cuelang.org/go v0.7.0 + cuelang.org/go v0.7.1 github.com/cockroachdb/apd/v3 v3.2.1 golang.org/x/text v0.13.0 ) diff --git a/play/go.sum b/play/go.sum index 816dd3464..f7152a9b0 100644 --- a/play/go.sum +++ b/play/go.sum @@ -1,7 +1,7 @@ cuelabs.dev/go/oci/ociregistry v0.0.0-20231103182354-93e78c079a13 h1:zkiIe8AxZ/kDjqQN+mDKc5BxoVJOqioSdqApjc+eB1I= cuelabs.dev/go/oci/ociregistry v0.0.0-20231103182354-93e78c079a13/go.mod h1:XGKYSMtsJWfqQYPwq51ZygxAPqpEUj/9bdg16iDPTAA= -cuelang.org/go v0.7.0 h1:gMztinxuKfJwMIxtboFsNc6s8AxwJGgsJV+3CuLffHI= -cuelang.org/go v0.7.0/go.mod h1:ix+3dM/bSpdG9xg6qpCgnJnpeLtciZu+O/rDbywoMII= +cuelang.org/go v0.7.1 h1:wSuUSIKR9M1yrph57l8EJATWVRWHaq/Zd0dFUL10PC8= +cuelang.org/go v0.7.1/go.mod h1:ix+3dM/bSpdG9xg6qpCgnJnpeLtciZu+O/rDbywoMII= github.com/cockroachdb/apd/v3 v3.2.1 h1:U+8j7t0axsIgvQUqthuNm82HIrYXodOV2iWLWtEaIwg= github.com/cockroachdb/apd/v3 v3.2.1/go.mod h1:klXJcjp+FffLTHlhIG69tezTDvdP065naDsHzKhYSqc= github.com/emicklei/proto v1.10.0 h1:pDGyFRVV5RvV+nkBK9iy3q67FBy9Xa7vwrOTE+g5aGw= diff --git a/play/src/components/gen_cuelang_org_go_version.ts b/play/src/components/gen_cuelang_org_go_version.ts index 4fb8700ef..3cfca79b7 100644 --- a/play/src/components/gen_cuelang_org_go_version.ts +++ b/play/src/components/gen_cuelang_org_go_version.ts @@ -1 +1 @@ -export const CUEVersion = "v0.7.0"; +export const CUEVersion = "v0.7.1"; diff --git a/play/src/wasm_exec.js b/play/src/wasm_exec.js index e6c892109..bc6f21024 100644 --- a/play/src/wasm_exec.js +++ b/play/src/wasm_exec.js @@ -113,6 +113,10 @@ this.mem.setUint32(addr + 4, Math.floor(v / 4294967296), true); } + const setInt32 = (addr, v) => { + this.mem.setUint32(addr + 0, v, true); + } + const getInt64 = (addr) => { const low = this.mem.getUint32(addr + 0, true); const high = this.mem.getInt32(addr + 4, true); @@ -206,7 +210,10 @@ const timeOrigin = Date.now() - performance.now(); this.importObject = { - go: { + _gotest: { + add: (a, b) => a + b, + }, + gojs: { // Go's SP does not change as long as no Go code is running. Some operations (e.g. calls, getters and setters) // may synchronously trigger a Go event handler. This makes Go code get executed in the middle of the imported // function. A goroutine can switch to a new stack if the current stack is too small (see morestack function). @@ -269,7 +276,7 @@ this._resume(); } }, - getInt64(sp + 8) + 1, // setTimeout has been seen to fire up to 1 millisecond early + getInt64(sp + 8), )); this.mem.setInt32(sp + 16, id, true); },