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

Use Go 1.20 #2098

Merged
merged 2 commits into from
Mar 2, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ body:
label: Environment
description: |
examples:
- **OS**: Ubuntu 20.04
- **OS**: Ubuntu 22.04
- **Architecture**: x86_64
- **Version**: v0.7.0
- **Go version**: 1.19.3
- **Git version**: 2.37.1
- **Version**: v0.9.0
- **Go version**: 1.20.1
- **Git version**: 2.39.2
- **Deployment**: Docker
- **Deployment details**: Docker version 20.10.8 Compose version 1.29.2
- **Deployment details**: Docker version 20.10.23
value: |
- OS:
- Architecture:
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ On macOS and Windows, [Docker Desktop](https://www.docker.com/products/docker-de
On Windows, it should be [configured to use WSL 2](https://docs.docker.com/desktop/windows/wsl/) without any distro;
all commands should be run on the host.

You will need Go 1.19 or later on the host.
You will need Go 1.20 or later on the host.
If your package manager doesn't provide it yet,
please install it from [go.dev](https://go.dev/dl/).

Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ARG VERSION
ARG COMMIT
ARG RACEFLAG

FROM ghcr.io/ferretdb/golang:1.19.6-1 AS build
FROM ghcr.io/ferretdb/golang:1.20.1-1 AS build

WORKDIR /src
ADD . .
Expand All @@ -16,7 +16,7 @@ RUN go mod download
RUN go build -v -o=bin/ferretdb -trimpath -tags=ferretdb_testcover,ferretdb_tigris ${RACEFLAG} ./cmd/ferretdb
RUN go test -c -o=bin/ferretdb -trimpath -tags=ferretdb_testcover,ferretdb_tigris ${RACEFLAG} -coverpkg=./... ./cmd/ferretdb

FROM ghcr.io/ferretdb/golang:1.19.6-1
FROM ghcr.io/ferretdb/golang:1.20.1-1

COPY --from=build /src/bin/ferretdb /ferretdb

Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module github.com/FerretDB/FerretDB

go 1.19
go 1.20

require (
github.com/AlekSi/pointer v1.2.0
github.com/SAP/go-hdb v1.1.0
github.com/SAP/go-hdb v1.1.1
github.com/alecthomas/kong v0.7.1
github.com/google/uuid v1.3.0
github.com/jackc/pgconn v1.14.0
Expand All @@ -15,7 +15,7 @@ require (
github.com/prometheus/client_model v0.3.0
github.com/prometheus/common v0.41.0
github.com/stretchr/testify v1.8.2
github.com/tigrisdata/tigris-client-go v1.0.0-beta.23
github.com/tigrisdata/tigris-client-go v1.0.0-beta.24
go.opentelemetry.io/otel v1.14.0
go.uber.org/zap v1.24.0
golang.org/x/crypto v0.6.0 // indirect; always use @latest
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03
github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
github.com/RaveNoX/go-jsoncommentstrip v1.0.0/go.mod h1:78ihd09MekBnJnxpICcwzCMzGrKSKYe4AqU6PDYYpjk=
github.com/SAP/go-hdb v1.1.0 h1:mjnjpDVabcqRh4KUfgPkeB/+qgFHe/LyfP0nJQsb0gg=
github.com/SAP/go-hdb v1.1.0/go.mod h1:sjKmhTZTaYCKhJElq1fjwDKInPtLC9VhDtkDWcn9CVg=
github.com/SAP/go-hdb v1.1.1 h1:C2wAjcQxzStJmDXlFdNYgqvDATHmgh00yDpTcTgZwJU=
github.com/SAP/go-hdb v1.1.1/go.mod h1:9SUyBwe2Iyp3MigpVZvooq3G7B9kJEe+YfKNDhC2VZE=
github.com/alecthomas/assert/v2 v2.1.0 h1:tbredtNcQnoSd3QBhQWI7QZ3XHOVkw1Moklp2ojoH/0=
github.com/alecthomas/kong v0.7.1 h1:azoTh0IOfwlAX3qN9sHWTxACE2oV8Bg2gAwBsMwDQY4=
github.com/alecthomas/kong v0.7.1/go.mod h1:n1iCIO2xS46oE8ZfYCNDqdR0b0wZNrXAIAqro/2132U=
Expand Down Expand Up @@ -263,8 +263,8 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/tigrisdata/tigris-client-go v1.0.0-beta.23 h1:rbC/ivyEa2a+5fawx8BiY9Xfvt4vqfCYmP1opri82dc=
github.com/tigrisdata/tigris-client-go v1.0.0-beta.23/go.mod h1:sT5YZVA9AwI31vIKv0WHqOQYE9pi41HDQ2GDHBo4i3s=
github.com/tigrisdata/tigris-client-go v1.0.0-beta.24 h1:lPR3MiP+RqNdNbjRU2JDXoj/j8v2ZFWpjCSVyaA+OA8=
github.com/tigrisdata/tigris-client-go v1.0.0-beta.24/go.mod h1:sT5YZVA9AwI31vIKv0WHqOQYE9pi41HDQ2GDHBo4i3s=
github.com/ugorji/go v1.2.7 h1:qYhyWUUd6WbiM+C6JZAUkIJt/1WrjzNHY9+KCIjVqTo=
github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M=
github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0=
Expand Down
6 changes: 3 additions & 3 deletions integration/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/FerretDB/FerretDB/integration

go 1.19
go 1.20

replace github.com/FerretDB/FerretDB => ../

Expand All @@ -24,7 +24,7 @@ require (
require (
cloud.google.com/go/compute v1.18.0 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
github.com/SAP/go-hdb v1.1.0 // indirect
github.com/SAP/go-hdb v1.1.1 // indirect
github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect
github.com/benbjohnson/clock v1.1.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
Expand Down Expand Up @@ -70,7 +70,7 @@ require (
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.41.0 // indirect
github.com/prometheus/procfs v0.9.0 // indirect
github.com/tigrisdata/tigris-client-go v1.0.0-beta.23 // indirect
github.com/tigrisdata/tigris-client-go v1.0.0-beta.24 // indirect
github.com/xdg-go/pbkdf2 v1.0.0 // indirect
github.com/xdg-go/scram v1.1.1 // indirect
github.com/xdg-go/stringprep v1.0.3 // indirect
Expand Down
8 changes: 4 additions & 4 deletions integration/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03
github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
github.com/RaveNoX/go-jsoncommentstrip v1.0.0/go.mod h1:78ihd09MekBnJnxpICcwzCMzGrKSKYe4AqU6PDYYpjk=
github.com/SAP/go-hdb v1.1.0 h1:mjnjpDVabcqRh4KUfgPkeB/+qgFHe/LyfP0nJQsb0gg=
github.com/SAP/go-hdb v1.1.0/go.mod h1:sjKmhTZTaYCKhJElq1fjwDKInPtLC9VhDtkDWcn9CVg=
github.com/SAP/go-hdb v1.1.1 h1:C2wAjcQxzStJmDXlFdNYgqvDATHmgh00yDpTcTgZwJU=
github.com/SAP/go-hdb v1.1.1/go.mod h1:9SUyBwe2Iyp3MigpVZvooq3G7B9kJEe+YfKNDhC2VZE=
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
github.com/apapsch/go-jsonmerge/v2 v2.0.0 h1:axGnT1gRIfimI7gJifB699GoE/oq+F2MU7Dml6nw9rQ=
github.com/apapsch/go-jsonmerge/v2 v2.0.0/go.mod h1:lvDnEdqiQrp0O42VQGgmlKpxL1AP2+08jFMw88y4klk=
Expand Down Expand Up @@ -270,8 +270,8 @@ github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4=
github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
github.com/tigrisdata/tigris-client-go v1.0.0-beta.23 h1:rbC/ivyEa2a+5fawx8BiY9Xfvt4vqfCYmP1opri82dc=
github.com/tigrisdata/tigris-client-go v1.0.0-beta.23/go.mod h1:sT5YZVA9AwI31vIKv0WHqOQYE9pi41HDQ2GDHBo4i3s=
github.com/tigrisdata/tigris-client-go v1.0.0-beta.24 h1:lPR3MiP+RqNdNbjRU2JDXoj/j8v2ZFWpjCSVyaA+OA8=
github.com/tigrisdata/tigris-client-go v1.0.0-beta.24/go.mod h1:sT5YZVA9AwI31vIKv0WHqOQYE9pi41HDQ2GDHBo4i3s=
github.com/ugorji/go v1.2.7 h1:qYhyWUUd6WbiM+C6JZAUkIJt/1WrjzNHY9+KCIjVqTo=
github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M=
github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0=
Expand Down
4 changes: 2 additions & 2 deletions tools/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func main() {
flag.Parse()

if *oldF {
log.Fatalf("FerretDB requires Go 1.19 or later.")
log.Fatalf("FerretDB requires Go 1.20 or later.")
}

v := runtime.Version()
Expand All @@ -51,6 +51,6 @@ func main() {
}

if minor < 18 {
log.Fatalf("FerretDB requires Go 1.19 or later. The version of `go` binary in $PATH is %q.", v)
log.Fatalf("FerretDB requires Go 1.20 or later. The version of `go` binary in $PATH is %q.", v)
}
}
2 changes: 1 addition & 1 deletion tools/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/FerretDB/FerretDB/tools

go 1.19
go 1.20

require (
github.com/BurntSushi/go-sumtype v0.0.0-20221020234012-480526a59796
Expand Down
4 changes: 2 additions & 2 deletions tools/old.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

// Keep both old and new styles of build tags.

//go:build !go1.19
// +build !go1.19
//go:build !go1.20
// +build !go1.20

package tools

Expand Down
6 changes: 3 additions & 3 deletions tools/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

// Keep both old and new styles of build tags.

//go:build go1.19
// +build go1.19
//go:build go1.20
// +build go1.20

package tools

Expand All @@ -35,7 +35,7 @@ import (
)

// Check that `go` in $PATH have the right version.
// Catches problems like `/some/path/go generate` invocations where `/some/path/go` is 1.19+
// Catches problems like `/some/path/go generate` invocations where `/some/path/go` is 1.20+
// (that's checked by the build tags above), but just `go` in $PATH (typically something like `/usr/bin/go`)
// is an earlier version.

Expand Down