From 780031930d5026dafdfee3b8b94fa6ffe0dbcb01 Mon Sep 17 00:00:00 2001 From: Randy Reddig Date: Wed, 12 Feb 2025 08:24:00 -0800 Subject: [PATCH 1/6] all: Go 1.24 --- .github/workflows/test.yaml | 6 +++--- CHANGELOG.md | 1 + cm/go.mod | 2 +- go.mod | 2 +- go.work | 2 +- testdata/go.mod | 2 +- tests/go.mod | 2 +- 7 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index e336e7f7..4623a0ce 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -44,7 +44,7 @@ jobs: timeout-minutes: 15 strategy: matrix: - go-version: ["1.22", "1.23"] + go-version: ["1.23", "1.24"] steps: - name: Checkout repo uses: actions/checkout@v4 @@ -77,7 +77,7 @@ jobs: timeout-minutes: 15 strategy: matrix: - go-version: ["1.22", "1.23"] + go-version: ["1.23", "1.24"] tinygo-version: ["0.33.0", "0.34.0", "0.35.0"] steps: - name: Checkout repo @@ -108,7 +108,7 @@ jobs: timeout-minutes: 15 strategy: matrix: - go-version: ["1.22", "1.23"] + go-version: ["1.23", "1.24"] tinygo-version: ["0.33.0", "0.34.0", "0.35.0"] steps: - name: Checkout repo diff --git a/CHANGELOG.md b/CHANGELOG.md index aea53ceb..35717d97 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), - Breaking: generated `*.wasm.go` files will now have correct WIT kebab-case base name. Interfaces or worlds with `-` in their name will require removal of the previous `*.wasm.go` files. - Breaking: upgraded to `wasm-tools` [v1.227.1](https://github.com/bytecodealliance/wasm-tools/releases/tag/v1.227.1), which [removes support](https://github.com/bytecodealliance/wasm-tools/pull/2050) for multiple return values and flags with > 32 values. To ease migration, this package will continue to support JSON generated by `wasm-tools` v1.225.0 and earlier. - Dropped support for TinyGo v0.32.0. +- Added support for Go 1.24 and dropped support for Go 1.22. ### Fixed diff --git a/cm/go.mod b/cm/go.mod index 1f7634d7..f8e24af7 100644 --- a/cm/go.mod +++ b/cm/go.mod @@ -1,3 +1,3 @@ module go.bytecodealliance.org/cm -go 1.22.0 +go 1.23.0 diff --git a/go.mod b/go.mod index a22371b8..2c9e2f08 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module go.bytecodealliance.org -go 1.22.0 +go 1.23.0 require ( github.com/coreos/go-semver v0.3.1 diff --git a/go.work b/go.work index df5e2eff..d89b68f7 100644 --- a/go.work +++ b/go.work @@ -1,4 +1,4 @@ -go 1.22.0 +go 1.23.0 use ( . diff --git a/testdata/go.mod b/testdata/go.mod index 24e2e712..f5c060f3 100644 --- a/testdata/go.mod +++ b/testdata/go.mod @@ -1,4 +1,4 @@ // This go.mod file exists to prevent the testdata directory from being included in module distribution. module testdata -go 1.22.0 +go 1.23.0 diff --git a/tests/go.mod b/tests/go.mod index cc00d859..687ce4f9 100644 --- a/tests/go.mod +++ b/tests/go.mod @@ -1,3 +1,3 @@ module tests -go 1.22.0 +go 1.23.0 From 9f146e4a731137e559a41306d74bee1d88d75709 Mon Sep 17 00:00:00 2001 From: Randy Reddig Date: Tue, 4 Mar 2025 10:43:24 -0800 Subject: [PATCH 2/6] .github/workflows: drop TinyGo 0.33.0, add 0.36.0 --- .github/workflows/test.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 4623a0ce..9255e10c 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -78,7 +78,7 @@ jobs: strategy: matrix: go-version: ["1.23", "1.24"] - tinygo-version: ["0.33.0", "0.34.0", "0.35.0"] + tinygo-version: ["0.34.0", "0.35.0", "0.36.0"] steps: - name: Checkout repo uses: actions/checkout@v4 @@ -109,7 +109,7 @@ jobs: strategy: matrix: go-version: ["1.23", "1.24"] - tinygo-version: ["0.33.0", "0.34.0", "0.35.0"] + tinygo-version: ["0.34.0", "0.35.0", "0.36.0"] steps: - name: Checkout repo uses: actions/checkout@v4 @@ -158,8 +158,7 @@ jobs: - name: Test wasm/wasip2 with TinyGo run: tinygo test -v -target=wasip2 ${{ env.go-modules }} - - name: Test generated Go with TinyGo >= 0.34.0 - if: ${{ matrix.tinygo-version != '0.33.0' }} + - name: Test generated Go with TinyGo run: tinygo test -v -target wasip2 ./tests/... - name: Verify repo is unchanged From e85718c968b96f983f0048e81a517fb02263cf7e Mon Sep 17 00:00:00 2001 From: Randy Reddig Date: Tue, 4 Mar 2025 13:52:40 -0800 Subject: [PATCH 3/6] .github/workflows/test: exclude older versions of TinyGo from Go 1.24 tests --- .github/workflows/test.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 9255e10c..a4beb868 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -79,6 +79,11 @@ jobs: matrix: go-version: ["1.23", "1.24"] tinygo-version: ["0.34.0", "0.35.0", "0.36.0"] + exclude: + - go-version: "1.24" + tinygo-version: "0.34.0" + - go-version: "1.24" + tinygo-version: "0.35.0" steps: - name: Checkout repo uses: actions/checkout@v4 @@ -110,6 +115,11 @@ jobs: matrix: go-version: ["1.23", "1.24"] tinygo-version: ["0.34.0", "0.35.0", "0.36.0"] + exclude: + - go-version: "1.24" + tinygo-version: "0.34.0" + - go-version: "1.24" + tinygo-version: "0.35.0" steps: - name: Checkout repo uses: actions/checkout@v4 From b9ad3f45d58e23ae283c8baf62bd9ad365de58c2 Mon Sep 17 00:00:00 2001 From: Randy Reddig Date: Tue, 4 Mar 2025 13:56:04 -0800 Subject: [PATCH 4/6] .github/workflows/test: add GOROOT/lib/wasm to PATH for go1.24 --- .github/workflows/test.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index a4beb868..50ef903c 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -148,7 +148,9 @@ jobs: version: ${{ env.wasmtime-version }} - name: Add Go wasm exec to $PATH - run: echo "$(go env GOROOT)/misc/wasm" >> $GITHUB_PATH + run: | + echo "$(go env GOROOT)/misc/wasm" >> $GITHUB_PATH + echo "$(go env GOROOT)/lib/wasm" >> $GITHUB_PATH - name: Regenerate Go run: make tests/generated From cca3f89a7d15ebdc010c49529979ef17551aa038 Mon Sep 17 00:00:00 2001 From: Randy Reddig Date: Sat, 15 Mar 2025 16:17:46 -0700 Subject: [PATCH 5/6] CHANGELOG: drop TinyGo v0.33.0 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 35717d97..193e3731 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), - Breaking: generated `*.wasm.go` files will now have correct WIT kebab-case base name. Interfaces or worlds with `-` in their name will require removal of the previous `*.wasm.go` files. - Breaking: upgraded to `wasm-tools` [v1.227.1](https://github.com/bytecodealliance/wasm-tools/releases/tag/v1.227.1), which [removes support](https://github.com/bytecodealliance/wasm-tools/pull/2050) for multiple return values and flags with > 32 values. To ease migration, this package will continue to support JSON generated by `wasm-tools` v1.225.0 and earlier. -- Dropped support for TinyGo v0.32.0. +- Dropped support for TinyGo v0.32.0 and v0.33.0. - Added support for Go 1.24 and dropped support for Go 1.22. ### Fixed From 733ad35d65691dcc0199184be1fdc0ee9e13a943 Mon Sep 17 00:00:00 2001 From: Randy Reddig Date: Sat, 15 Mar 2025 20:26:25 -0700 Subject: [PATCH 6/6] cmd/wit-bindgen-go: temporarily disable testing this package under TinyGo + Go 1.24 --- cmd/wit-bindgen-go/main_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/wit-bindgen-go/main_test.go b/cmd/wit-bindgen-go/main_test.go index 5fdb8fcf..c0cec542 100644 --- a/cmd/wit-bindgen-go/main_test.go +++ b/cmd/wit-bindgen-go/main_test.go @@ -1,3 +1,6 @@ +// TODO: Remove the following go:build line when TinyGo supports Go 1.24. +//go:build !(tinygo && go1.24) + package main import (