Skip to content

all: add support for Go 1.24, drop Go 1.22 #294

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Mar 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 19 additions & 8 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -77,8 +77,13 @@ jobs:
timeout-minutes: 15
strategy:
matrix:
go-version: ["1.22", "1.23"]
tinygo-version: ["0.33.0", "0.34.0", "0.35.0"]
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
Expand Down Expand Up @@ -108,8 +113,13 @@ jobs:
timeout-minutes: 15
strategy:
matrix:
go-version: ["1.22", "1.23"]
tinygo-version: ["0.33.0", "0.34.0", "0.35.0"]
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
Expand Down Expand Up @@ -138,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
Expand All @@ -158,8 +170,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
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ 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

Expand Down
2 changes: 1 addition & 1 deletion cm/go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module go.bytecodealliance.org/cm

go 1.22.0
go 1.23.0
3 changes: 3 additions & 0 deletions cmd/wit-bindgen-go/main_test.go
Original file line number Diff line number Diff line change
@@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion go.work
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
go 1.22.0
go 1.23.0

use (
.
Expand Down
2 changes: 1 addition & 1 deletion testdata/go.mod
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion tests/go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module tests

go 1.22.0
go 1.23.0
Loading