Skip to content

Commit

Permalink
chore: drop support for go < 1.18 (aws#3774)
Browse files Browse the repository at this point in the history
Those have been end-of-life for a while now, and
go 1.20 is expected to release in February 2023.
  • Loading branch information
RomainMuller authored Sep 27, 2022
1 parent d98aa1b commit 4fd370b
Show file tree
Hide file tree
Showing 11 changed files with 275 additions and 492 deletions.
12 changes: 0 additions & 12 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -224,18 +224,6 @@ jobs:
os: ubuntu-latest
python: '3.7'
# Test alternate Gos
- java: '8'
dotnet: '3.1.x'
go: '1.16' # EOL since March 15, 2022 (in grace period until end of september 2022)
node: '14'
os: ubuntu-latest
python: '3.7'
- java: '8'
dotnet: '3.1.x'
go: '1.17' # EOL since August 02, 2022 (in grace period until end of september 2022)
node: '14'
os: ubuntu-latest
python: '3.7'
- java: '8'
dotnet: '3.1.x'
go: '1.19'
Expand Down
12 changes: 12 additions & 0 deletions .mergify/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ queue_rules:
# One test for each supported dotnet version
- status-success~=^Test \(.* dotnet 3\.1\.x .*$
- status-success~=^Test \(.* dotnet 6\.0\.x .*$
# One test for each supported go version
- status-success~=^Test \(.* go 1.18 .*$
- status-success~=^Test \(.* go 1.19 .*$
# One test for Java 8 and 11
- status-success~=^Test \(.* java 8 .*$
- status-success~=^Test \(.* java 11 .*$
Expand Down Expand Up @@ -63,6 +66,9 @@ pull_request_rules:
# One test for each supported dotnet version
- status-success~=^Test \(.* dotnet 3\.1\.x .*$
- status-success~=^Test \(.* dotnet 6\.0\.x .*$
# One test for each supported go version
- status-success~=^Test \(.* go 1.18 .*$
- status-success~=^Test \(.* go 1.19 .*$
# One test for Java 8 and 11
- status-success~=^Test \(.* java 8 .*$
- status-success~=^Test \(.* java 11 .*$
Expand Down Expand Up @@ -112,6 +118,9 @@ pull_request_rules:
# One test for each supported dotnet version
- status-success~=^Test \(.* dotnet 3\.1\.x .*$
- status-success~=^Test \(.* dotnet 6\.0\.x .*$
# One test for each supported go version
- status-success~=^Test \(.* go 1.18 .*$
- status-success~=^Test \(.* go 1.19 .*$
# One test for Java 8 and 11
- status-success~=^Test \(.* java 8 .*$
- status-success~=^Test \(.* java 11 .*$
Expand Down Expand Up @@ -161,6 +170,9 @@ pull_request_rules:
# One test for each supported dotnet version
- status-success~=^Test \(.* dotnet 3\.1\.x .*$
- status-success~=^Test \(.* dotnet 6\.0\.x .*$
# One test for each supported go version
- status-success~=^Test \(.* go 1.18 .*$
- status-success~=^Test \(.* go 1.19 .*$
# One test for Java 8 and 11
- status-success~=^Test \(.* java 8 .*$
- status-success~=^Test \(.* java 11 .*$
Expand Down
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,15 @@ in your development environment.
+ [`setuptools >= 38.6.0`](https://pypi.org/project/setuptools/)
+ [`wheel`](https://pypi.org/project/wheel/)
+ *Recommended:* [`twine`](https://pypi.org/project/twine/)
- [Go] `1.18` or newer

[Node `14.6.0`]: https://nodejs.org/download/release/v14.6.0/
[Yarn `1.19.1`]: https://yarnpkg.com/en/docs/install
[Oracle's OpenJDK8]: http://openjdk.java.net/install/
[Amazon Corretto 8]: https://aws.amazon.com/corretto/
[.NET Core `3.1`]: https://www.microsoft.com/net/download
[Python `3.7.3`]: https://www.python.org/downloads/release/python-373/
[Go]: https://go.dev/dl/

## Getting Started
### Bootstrapping
Expand Down
15 changes: 14 additions & 1 deletion packages/@jsii/go-runtime-test/project/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/aws/jsii/go-runtime-test

go 1.16
go 1.18

require (
github.com/aws/jsii-runtime-go v0.0.0
Expand All @@ -12,6 +12,19 @@ require (
golang.org/x/tools v0.1.12
)

require (
github.com/Masterminds/semver/v3 v3.1.1 // indirect
github.com/aws/jsii/jsii-calc/go/scopejsiicalcbaseofbase/v2 v2.1.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/yuin/goldmark v1.4.13 // indirect
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

replace (
github.com/aws/jsii-runtime-go v0.0.0 => ../../go-runtime/jsii-runtime-go
github.com/aws/jsii/jsii-calc/go/jcb v0.0.0 => ../jsii-calc/go/jcb
Expand Down
12 changes: 11 additions & 1 deletion packages/@jsii/go-runtime/jsii-runtime-go/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/aws/jsii-runtime-go

go 1.16
go 1.18

require (
github.com/Masterminds/semver/v3 v3.1.1
Expand All @@ -10,4 +10,14 @@ require (
golang.org/x/tools v0.1.12
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/yuin/goldmark v1.4.13 // indirect
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

retract v1.27.0
14 changes: 0 additions & 14 deletions packages/@jsii/go-runtime/jsii-runtime-go/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -16,38 +16,24 @@ github.com/yuin/goldmark v1.4.13 h1:fVcFKWvrslecOb/tg+Cc05dkeYx540o0FuFt3nUVDoE=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug=
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab h1:2QkjZIsXupsJbJIdSjjUOgWK3aEtzyuh2mPt3l/CkeU=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Expand Down
8 changes: 3 additions & 5 deletions packages/jsii-pacmak/lib/targets/go.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,9 @@ export class Golang extends Target {

try {
// run `go build` with local.go.mod, go 1.16+ requires that we download
// modules explicit so go.sum is updated. We'd normally want to use
// `go mod download`, but because of a bug in go 1.16, we have to use
// `go mod tidy` instead.
//
// See: https://github.com/golang/go/issues/44129
// modules explicit so go.sum is updated. We'd want to use
// `go mod download`, but it does not add missing entries in the `go.sum`
// file while `go mod tidy` does.
await go('mod', ['tidy', '-modfile', localGoMod.path], {
cwd: pkgDir,
});
Expand Down
4 changes: 1 addition & 3 deletions packages/jsii-pacmak/lib/targets/go/package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import {
import { VersionFile } from './version-file';

export const GOMOD_FILENAME = 'go.mod';
export const GO_VERSION = '1.16';
export const GO_VERSION = '1.18';

/*
* Package represents a single `.go` source file within a package. This can be the root package file or a submodule
Expand Down Expand Up @@ -288,8 +288,6 @@ export abstract class Package {
code.openFile(filePath);
// Conditional compilation tag...
code.line(`//go:build ${forNoOp ? '' : '!'}no_runtime_type_checking`);
// For go1.16 compatibility
code.line(`// +build ${forNoOp ? '' : '!'}no_runtime_type_checking`);
code.line();
this.emitHeader(code);

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 4fd370b

Please sign in to comment.