Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drop Go 1.16, add Go 1.18 #158

Merged
merged 1 commit into from Jun 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 6 additions & 7 deletions .github/workflows/test.yml
Expand Up @@ -11,17 +11,16 @@ jobs:
strategy:
fail-fast: false
matrix:
go-version: [1.16.x, 1.17.x]
go-version: [1.17.x, 1.18.x]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
stable: false
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Test
run: |
go test ./...
Expand All @@ -41,22 +40,22 @@ jobs:
steps:
- name: Install Go
env:
GO_COMMIT: d032b2b2c8235ef25275405f6655866f2c81661d # 2021-10-12
GO_COMMIT: 2cfbef438049fd4c3f73d1562773ad1f93900897 # 2022-06-09
run: |
cd $HOME
mkdir $HOME/gotip
cd $HOME/gotip

wget -O gotip.tar.gz https://go.googlesource.com/go/+archive/${GO_COMMIT}.tar.gz
tar -xf gotip.tar.gz
echo "devel go1.18-${GO_COMMIT}" >VERSION
echo "devel go1.19-${GO_COMMIT}" >VERSION

cd src
./make.bash
echo "GOROOT=$HOME/gotip" >>$GITHUB_ENV
echo "$HOME/gotip/bin" >>$GITHUB_PATH
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Test
run: |
go version
Expand Down
2 changes: 1 addition & 1 deletion go.mod
@@ -1,5 +1,5 @@
module github.com/rogpeppe/go-internal

go 1.16
go 1.17
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we leave support for go1.16 until we actually require go1.17 features?
I suspect there are a bunch of people still using 1.16 out there.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that a policy we want to enforce going forward? We didn't support Go 1.15 when 1.17 was the latest version, so what you say would be a change - supporting 3 major versions rather than 2. I personally think it's unnecessary at this point, given that 1.18 has been out for three months and 1.16.x has been unsupported upstream for a while too :)

Worth noting that bumping this version here doesn't preclude building on 1.16; in fact it should continue to work until we actually do start using new features/APIs. But more than anything, it's a signal that we only test and explicitly support 1.16 or later.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reckon that it's nicer to keep support for a given version until we need to drop it tbh. Is there any significant cost to us doing so?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No immediate cost, but CI does get slower the more versions we support, and we do have shenanigans like dealing with the signature of testing.MainStart for example. We have 6 CI jobs and we'd likely jump to 9.

If we want to change the supported version policy that's fine with me, I just wasn't aware that was your intention. Either way, I'll leave it to you to wrap up this PR however you see fit, because I don't have strong opinions either way :)


require github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e