aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2024-06-12 13:28:30 +0200
committerRon Evans <[email protected]>2024-06-12 14:46:47 +0200
commit077b35e9ad030d7dcf1c35249378c5fa1608c2df (patch)
tree29ea40e0dac80ce890e743542f94e6f776830d15
parent880e9404177bb2dae45a4fead141e96cd4b2024a (diff)
downloadtinygo-077b35e9ad030d7dcf1c35249378c5fa1608c2df.tar.gz
tinygo-077b35e9ad030d7dcf1c35249378c5fa1608c2df.zip
all: drop support for Go 1.18
Go 1.18 has been unsupported for quite a while now (the oldest supported version is Go 1.21). But more importantly, the golang.org/x/tools module now requires Go 1.19 or later. So we'll drop this older version.
-rw-r--r--.circleci/config.yml6
-rw-r--r--BUILDING.md2
-rw-r--r--builder/config.go4
-rw-r--r--compiler/interface.go3
-rw-r--r--go.mod2
5 files changed, 8 insertions, 9 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml
index a94040606..8d104de04 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -98,9 +98,9 @@ commands:
- /go/pkg/mod
jobs:
- test-llvm15-go118:
+ test-llvm15-go119:
docker:
- - image: golang:1.18-bullseye
+ - image: golang:1.19-bullseye
steps:
- test-linux:
llvm: "15"
@@ -118,6 +118,6 @@ workflows:
jobs:
# This tests our lowest supported versions of Go and LLVM, to make sure at
# least the smoke tests still pass.
- - test-llvm15-go118
+ - test-llvm15-go119
# This tests LLVM 18 support when linking against system libraries.
- test-llvm18-go122
diff --git a/BUILDING.md b/BUILDING.md
index 52e411ec5..dfc069c0f 100644
--- a/BUILDING.md
+++ b/BUILDING.md
@@ -18,7 +18,7 @@ tarball. If you want to help with development of TinyGo itself, you should follo
LLVM, Clang and LLD are quite light on dependencies, requiring only standard
build tools to be built. Go is of course necessary to build TinyGo itself.
- * Go (1.18+)
+ * Go (1.19+)
* GNU Make
* Standard build tools (gcc/clang)
* git
diff --git a/builder/config.go b/builder/config.go
index d6d1a3838..a82450a63 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 > 22 {
+ if major != 1 || minor < 19 || 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.22, got go%d.%d", major, minor)
+ return nil, fmt.Errorf("requires go version 1.19 through 1.22, got go%d.%d", major, minor)
}
return &compileopts.Config{
diff --git a/compiler/interface.go b/compiler/interface.go
index b6dffd643..fc698c7a9 100644
--- a/compiler/interface.go
+++ b/compiler/interface.go
@@ -514,8 +514,7 @@ var basicTypeNames = [...]string{
func getTypeCodeName(t types.Type) (string, bool) {
switch t := t.(type) {
case *types.Named:
- // Note: check for `t.Obj().Pkg() != nil` for Go 1.18 only.
- if t.Obj().Pkg() != nil && t.Obj().Parent() != t.Obj().Pkg().Scope() {
+ if t.Obj().Parent() != t.Obj().Pkg().Scope() {
return "named:" + t.String() + "$local", true
}
return "named:" + t.String(), false
diff --git a/go.mod b/go.mod
index 6d40cd649..c034fa558 100644
--- a/go.mod
+++ b/go.mod
@@ -1,6 +1,6 @@
module github.com/tinygo-org/tinygo
-go 1.18
+go 1.19
require (
github.com/aykevl/go-wasm v0.0.2-0.20240312204833-50275154210c