Skip to content

Commit 077b35e

Browse files
aykevldeadprogram
authored andcommitted
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.
1 parent 880e940 commit 077b35e

File tree

5 files changed

+8
-9
lines changed

5 files changed

+8
-9
lines changed

.circleci/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ commands:
9898
- /go/pkg/mod
9999

100100
jobs:
101-
test-llvm15-go118:
101+
test-llvm15-go119:
102102
docker:
103-
- image: golang:1.18-bullseye
103+
- image: golang:1.19-bullseye
104104
steps:
105105
- test-linux:
106106
llvm: "15"
@@ -118,6 +118,6 @@ workflows:
118118
jobs:
119119
# This tests our lowest supported versions of Go and LLVM, to make sure at
120120
# least the smoke tests still pass.
121-
- test-llvm15-go118
121+
- test-llvm15-go119
122122
# This tests LLVM 18 support when linking against system libraries.
123123
- test-llvm18-go122

BUILDING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ tarball. If you want to help with development of TinyGo itself, you should follo
1818
LLVM, Clang and LLD are quite light on dependencies, requiring only standard
1919
build tools to be built. Go is of course necessary to build TinyGo itself.
2020

21-
* Go (1.18+)
21+
* Go (1.19+)
2222
* GNU Make
2323
* Standard build tools (gcc/clang)
2424
* git

builder/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ func NewConfig(options *compileopts.Options) (*compileopts.Config, error) {
2727
if err != nil {
2828
return nil, err
2929
}
30-
if major != 1 || minor < 18 || minor > 22 {
30+
if major != 1 || minor < 19 || minor > 22 {
3131
// Note: when this gets updated, also update the Go compatibility matrix:
3232
// https://github.com/tinygo-org/tinygo-site/blob/dev/content/docs/reference/go-compat-matrix.md
33-
return nil, fmt.Errorf("requires go version 1.18 through 1.22, got go%d.%d", major, minor)
33+
return nil, fmt.Errorf("requires go version 1.19 through 1.22, got go%d.%d", major, minor)
3434
}
3535

3636
return &compileopts.Config{

compiler/interface.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -514,8 +514,7 @@ var basicTypeNames = [...]string{
514514
func getTypeCodeName(t types.Type) (string, bool) {
515515
switch t := t.(type) {
516516
case *types.Named:
517-
// Note: check for `t.Obj().Pkg() != nil` for Go 1.18 only.
518-
if t.Obj().Pkg() != nil && t.Obj().Parent() != t.Obj().Pkg().Scope() {
517+
if t.Obj().Parent() != t.Obj().Pkg().Scope() {
519518
return "named:" + t.String() + "$local", true
520519
}
521520
return "named:" + t.String(), false

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/tinygo-org/tinygo
22

3-
go 1.18
3+
go 1.19
44

55
require (
66
github.com/aykevl/go-wasm v0.0.2-0.20240312204833-50275154210c

0 commit comments

Comments
 (0)