diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 859225ee5e..179670b35b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,10 +32,10 @@ jobs: uses: actions/setup-dotnet@v2 with: dotnet-version: '6.0.x' - - name: Set up Go 1.16 + - name: Set up Go 1.18 uses: actions/setup-go@v3 with: - go-version: '1.16' + go-version: '1.18' - name: Set up Java 8 uses: actions/setup-java@v3 with: @@ -126,10 +126,10 @@ jobs: uses: actions/setup-dotnet@v2 with: dotnet-version: '6.0.x' - - name: Set up Go 1.16 + - name: Set up Go 1.18 uses: actions/setup-go@v3 with: - go-version: '1.16' + go-version: '1.18' - name: Set up Java 8 uses: actions/setup-java@v3 with: @@ -214,7 +214,7 @@ jobs: matrix: # All currently supported node versions (Maintenance LTS, Active LTS, Current) dotnet: ['3.1.x'] - go: ['1.16'] + go: ['1.18'] java: ['8'] node: - '14' # EOL 2023-04-30 @@ -227,47 +227,66 @@ jobs: # Test using Windows - os: windows-latest dotnet: '3.1.x' - go: '1.16' + go: '1.18' java: '8' node: '14' python: '3.7' # Test using macOS - os: macos-latest dotnet: '3.1.x' - go: '1.16' + go: '1.18' java: '8' node: '14' python: '3.7' # Test alternate .NETs - java: '8' dotnet: '6.0.x' - go: '1.16' + go: '1.18' + node: '14' + 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' node: '14' os: ubuntu-latest python: '3.7' # Test alternate Javas - java: '11' dotnet: '3.1.x' - go: '1.16' + go: '1.18' node: '14' os: ubuntu-latest python: '3.7' # Test alternate Pythons - python: '3.8' dotnet: '3.1.x' - go: '1.16' + go: '1.18' java: '8' node: '14' os: ubuntu-latest - python: '3.9' dotnet: '3.1.x' - go: '1.16' + go: '1.18' java: '8' node: '14' os: ubuntu-latest - python: '3.10' dotnet: '3.1.x' - go: '1.16' + go: '1.18' java: '8' node: '14' os: ubuntu-latest diff --git a/gh-pages/content/user-guides/lib-author/index.md b/gh-pages/content/user-guides/lib-author/index.md index c7beba1298..850024e4b9 100644 --- a/gh-pages/content/user-guides/lib-author/index.md +++ b/gh-pages/content/user-guides/lib-author/index.md @@ -17,7 +17,7 @@ to produce releasable artifacts. | Language/Platform | SDK Requirement | | ----------------- | ---------------------------- | | .NET | .NET Core ≥ 3.1 / .NET ≥ 5.0 | -| Go | Go ≥ 1.16 | +| Go | Go ≥ 1.18 | | Java | JDK ≥ 8 *and* Maven ≥ 3.6 | | Python | Python ≥ 3.7 | diff --git a/packages/@jsii/go-runtime-test/project/go.mod b/packages/@jsii/go-runtime-test/project/go.mod index 1c82de7d5c..b9e0e84998 100644 --- a/packages/@jsii/go-runtime-test/project/go.mod +++ b/packages/@jsii/go-runtime-test/project/go.mod @@ -1,6 +1,6 @@ module github.com/aws/jsii/go-runtime-test -go 1.17 +go 1.18 require ( github.com/aws/jsii-runtime-go v0.0.0 diff --git a/packages/@jsii/go-runtime/jsii-runtime-go/deprecationwarning.go b/packages/@jsii/go-runtime/jsii-runtime-go/deprecationwarning.go new file mode 100644 index 0000000000..6e1f950e35 --- /dev/null +++ b/packages/@jsii/go-runtime/jsii-runtime-go/deprecationwarning.go @@ -0,0 +1,22 @@ +//go:build (go1.16 || go1.17) && !go1.18 +// +build go1.16 go1.17 +// +build !go1.18 + +package jsii + +import ( + "fmt" + + "github.com/aws/jsii-runtime-go/internal/compiler" +) + +// / Emits a deprecation warning message when +func init() { + fmt.Println("###########################################################") + fmt.Printf("# This binary was compiled with %v, which has reached #\n", compiler.Version) + fmt.Printf("# end-of-life on %v. #", compiler.EndOfLifeDate) + fmt.Println("# Support for this version will be dropped in the future. #") + fmt.Println("# #") + fmt.Println("# See https://go.dev/security for more information. #") + fmt.Println("###########################################################") +} diff --git a/packages/@jsii/go-runtime/jsii-runtime-go/internal/compiler/go1.16.go b/packages/@jsii/go-runtime/jsii-runtime-go/internal/compiler/go1.16.go new file mode 100644 index 0000000000..e531403eae --- /dev/null +++ b/packages/@jsii/go-runtime/jsii-runtime-go/internal/compiler/go1.16.go @@ -0,0 +1,12 @@ +//go:build go1.16 && !go1.17 +// +build go1.16,!go1.17 + +package compiler + +// Version denotes the version of the go compiler that was used for building +// this binary. It is intended for use only in the compiler deprecation warning +// message. +const Version = "go1.16" + +// EndOfLifeDate is the date at which this compiler version reached end-of-life. +const EndOfLifeDate = "2022-03-15" diff --git a/packages/@jsii/go-runtime/jsii-runtime-go/internal/compiler/go1.17.go b/packages/@jsii/go-runtime/jsii-runtime-go/internal/compiler/go1.17.go new file mode 100644 index 0000000000..87f6410103 --- /dev/null +++ b/packages/@jsii/go-runtime/jsii-runtime-go/internal/compiler/go1.17.go @@ -0,0 +1,12 @@ +//go:build go1.17 && !go1.18 +// +build go1.17,!go1.18 + +package compiler + +// Version denotes the version of the go compiler that was used for building +// this binary. It is intended for use only in the compiler deprecation warning +// message. +const Version = "go1.17" + +// EndOfLifeDate is the date at which this compiler version reached end-of-life. +const EndOfLifeDate = "2022-08-02" diff --git a/packages/jsii-pacmak/lib/targets/go.ts b/packages/jsii-pacmak/lib/targets/go.ts index 4b69472b52..9e43bdce44 100644 --- a/packages/jsii-pacmak/lib/targets/go.ts +++ b/packages/jsii-pacmak/lib/targets/go.ts @@ -41,7 +41,7 @@ export class Golang extends Target { const localGoMod = await this.writeLocalGoMod(pkgDir); try { - // run `go build` with local.go.mod, go 1.16 requires that we download + // 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. diff --git a/superchain/Dockerfile b/superchain/Dockerfile index a3f9660cb5..5d74675e55 100644 --- a/superchain/Dockerfile +++ b/superchain/Dockerfile @@ -75,7 +75,7 @@ RUN POWERSHELL_RELEASE=$(curl -X GET -fSsIL "https://aka.ms/powershell-release?t && chmod +x /opt/microsoft/powershell/pwsh # Prepare Go distribution -ARG GO_VERSION="1.17.5" +ARG GO_VERSION="1.18.5" RUN curl -fSsL "https://golang.org/dl/go${GO_VERSION}.linux-${TARGETPLATFORM#linux/}.tar.gz" -o /tmp/go.tar.gz \ && mkdir -p /opt/golang/go \ && tar -xzf /tmp/go.tar.gz -C /opt/golang/go --strip-components=1 diff --git a/superchain/README.md b/superchain/README.md index 881744bcbd..425471c7f9 100644 --- a/superchain/README.md +++ b/superchain/README.md @@ -16,7 +16,7 @@ SDK | Version `Javascript` | see [NodeJS and NPM](#nodejs-and-npm) `PowerShell` | `pwsh >= 7.1.3` `Python 3` | `python3 >= 3.7.4` with `pip3 >= 20.0.2` -`Go` | `go >= 1.17` +`Go` | `go >= 1.18` ## Image tags