From 75236336fc473bfc749da77af7f57107ffa689d6 Mon Sep 17 00:00:00 2001 From: Benjamin Rewis <32186188+benjirewis@users.noreply.github.com> Date: Wed, 26 Oct 2022 19:12:59 -0400 Subject: [PATCH] GODRIVER-2174 Bump minimum Go version to 1.13. (#1100) Co-authored-by: Matt Dale <9760375+matthewdale@users.noreply.github.com> --- .evergreen/config.yml | 6 ++++-- CONTRIBUTING.md | 2 +- README.md | 5 +++-- go.mod | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 2821ecdaa5..834c08ed62 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -1799,13 +1799,15 @@ tasks: vars: MONGO_GO_DRIVER_COMPRESSOR: "snappy" - - name: go1.10-build + - name: go1.13-build tags: ["compile-check"] commands: - func: run-make vars: targets: "build" - BUILD_ENV: "PATH=/opt/golang/go1.10/bin:$PATH GOROOT=/opt/golang/go1.10" + # Use GO111MODULE=off to disable modules, as go versions less than + # 1.16 will complain about the retract directives in go.mod. + BUILD_ENV: "GO111MODULE=off PATH=/opt/golang/go1.13/bin:$PATH GOROOT=/opt/golang/go1.13" # Build with whatever the latest Go version is that we're using for tests - name: build diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5bef70142a..e8416c6aa5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -13,7 +13,7 @@ Before starting to write code, look for existing [tickets](https://jira.mongodb. The Go Driver team uses GitHub to manage and review all code changes. Patches should generally be made against the master (default) branch and include relevant tests, if applicable. -Code should compile and tests should pass under all Go versions which the driver currently supports. Currently the Go Driver supports a minimum version of Go 1.10 and requires Go 1.17 for development. Please run the following Make targets to validate your changes: +Code should compile and tests should pass under all Go versions which the driver currently supports. Currently the Go Driver supports a minimum version of Go 1.13 and requires Go 1.18 for development. Please run the following Make targets to validate your changes: - `make fmt` - `make lint` (requires [golangci-lint](https://github.com/golangci/golangci-lint) and [lll](https://github.com/walle/lll) to be installed and available in the `PATH`) - `make test` diff --git a/README.md b/README.md index 230fee58b3..d79659aa7f 100644 --- a/README.md +++ b/README.md @@ -22,8 +22,9 @@ The MongoDB supported driver for Go. ------------------------- ## Requirements -- Go 1.10 or higher if using the driver as a dependency. Go 1.17 or higher if building the driver yourself. We aim to support the latest versions of Go. -- MongoDB 2.6 and higher. +- Go 1.13 or higher. We aim to support the latest versions of Go. + - Go 1.18 or higher is required to run the driver test suite. +- MongoDB 3.6 and higher. ------------------------- ## Installation diff --git a/go.mod b/go.mod index 1b7f2ec7de..68dfa666d4 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module go.mongodb.org/mongo-driver -go 1.10 +go 1.13 retract ( [v1.7.0, v1.7.1] // Contains data race bug in background connection establishment.