From 38a80b45d3f5eb07670a4d8fe075315920f2c712 Mon Sep 17 00:00:00 2001 From: Ayke van Laethem Date: Wed, 17 Jan 2024 15:05:54 +0100 Subject: [PATCH] all: support Go 1.22 This adds initial support for Go 1.22. Not all new features are supported yet. --- .circleci/config.yml | 9 +++++++++ builder/config.go | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 24000821..5e8e6a03 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -105,6 +105,13 @@ jobs: - test-linux: llvm: "15" resource_class: large + test-llvm16-go122: + docker: + - image: golang:1.22-rc-bullseye + steps: + - test-linux: + llvm: "16" + resource_class: large test-llvm17-go121: docker: - image: golang:1.21-bullseye @@ -119,5 +126,7 @@ workflows: # This tests our lowest supported versions of Go and LLVM, to make sure at # least the smoke tests still pass. - test-llvm15-go118 + # This tests the upcoming Go 1.22 support. + - test-llvm16-go122 # This tests the upcoming LLVM 17 support. - test-llvm17-go121 diff --git a/builder/config.go b/builder/config.go index dc674fc8..d6d1a383 100644 --- a/builder/config.go +++ b/builder/config.go @@ -27,10 +27,10 @@ func NewConfig(options *compileopts.Options) (*compileopts.Config, error) { if err != nil { return nil, err } - if major != 1 || minor < 18 || minor > 21 { + if major != 1 || minor < 18 || minor > 22 { // Note: when this gets updated, also update the Go compatibility matrix: // https://github.com/tinygo-org/tinygo-site/blob/dev/content/docs/reference/go-compat-matrix.md - return nil, fmt.Errorf("requires go version 1.18 through 1.21, got go%d.%d", major, minor) + return nil, fmt.Errorf("requires go version 1.18 through 1.22, got go%d.%d", major, minor) } return &compileopts.Config{