test go 1.24 and drop support for 1.22

This commit is contained in:
Michael Eischer 2025-03-22 12:41:07 +01:00
parent c617364d15
commit 15e90b7a4c
5 changed files with 20 additions and 20 deletions

View File

@ -13,7 +13,7 @@ permissions:
contents: read
env:
latest_go: "1.23.x"
latest_go: "1.24.x"
GO111MODULE: on
jobs:
@ -23,29 +23,29 @@ jobs:
# list of jobs to run:
include:
- job_name: Windows
go: 1.23.x
go: 1.24.x
os: windows-latest
- job_name: macOS
go: 1.23.x
go: 1.24.x
os: macOS-latest
test_fuse: false
- job_name: Linux
go: 1.23.x
go: 1.24.x
os: ubuntu-latest
test_cloud_backends: true
test_fuse: true
check_changelog: true
- job_name: Linux (race)
go: 1.23.x
go: 1.24.x
os: ubuntu-latest
test_fuse: true
test_opts: "-race"
- job_name: Linux
go: 1.22.x
go: 1.23.x
os: ubuntu-latest
test_fuse: true

View File

@ -58,7 +58,7 @@ var config = Config{
Main: "./cmd/restic", // package name for the main package
DefaultBuildTags: []string{"selfupdate"}, // specify build tags which are always used
Tests: []string{"./..."}, // tests to run
MinVersion: GoVersion{Major: 1, Minor: 22, Patch: 0}, // minimum Go version supported
MinVersion: GoVersion{Major: 1, Minor: 23, Patch: 0}, // minimum Go version supported
}
// Config configures the build.
@ -382,12 +382,6 @@ func main() {
}
}
solarisMinVersion := GoVersion{Major: 1, Minor: 20, Patch: 0}
if env["GOARCH"] == "solaris" && !goVersion.AtLeast(solarisMinVersion) {
fmt.Fprintf(os.Stderr, "Detected version %s is too old, restic requires at least %s for Solaris\n", goVersion, solarisMinVersion)
os.Exit(1)
}
verbosePrintf("detected Go version %v\n", goVersion)
preserveSymbols := false

View File

@ -1,9 +1,11 @@
Change: Update dependencies and require Go 1.22 or newer
Change: Update dependencies and require Go 1.23 or newer
We have updated all dependencies. Since some libraries require newer Go standard
library features, support for Go 1.19, 1.20 and 1.21 has been dropped, which means
that restic now requires at least Go 1.22 to build.
We have updated all dependencies. Since some libraries require newer Go
standard library features, support for Go 1.19, 1.20, 1.21 and 1.22 has been
dropped, which means that restic now requires at least Go 1.23 to build.
This also disables support for TLS versions older than TLS 1.2.
This also disables support for TLS versions older than TLS 1.2. On Windows,
restic now requires at least Windows 10 or Windows Server 2016. On macOS,
restic now requires at least macOS 11 Big Sur.
https://github.com/restic/restic/pull/4938

View File

@ -284,7 +284,7 @@ From Source
***********
restic is written in the Go programming language and you need at least
Go version 1.22. Building restic may also work with older versions of Go,
Go version 1.23. Building restic may also work with older versions of Go,
but that's not supported. See the `Getting
started <https://go.dev/doc/install>`__ guide of the Go project for
instructions how to install Go.

6
go.mod
View File

@ -1,6 +1,10 @@
module github.com/restic/restic
go 1.22
go 1.23
// keep the old behavior for reparse points on windows until handling reparse points has been improved in restic
// https://forum.restic.net/t/windows-junction-backup-with-go1-23-or-later/8940
godebug winsymlink=0
require (
cloud.google.com/go/storage v1.43.0