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

ci: update Go and staticcheck versions #1639

Merged
merged 2 commits into from
Nov 11, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dominikh/[email protected]
with:
version: "2023.1.6"
- uses: dominikh/[email protected]

list:
runs-on: ubuntu-latest
Expand All @@ -31,10 +29,10 @@ jobs:
import os
go = [
# Keep the most recent production release at the top
'1.22',
'1.23',
# Older production releases
'1.22',
Comment on lines +32 to +34
Copy link

Choose a reason for hiding this comment

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

💡 Codebase verification

⚠️ Go 1.23 compatibility concerns found

The codebase currently specifies Go 1.20 in go.mod, which is significantly behind the proposed Go 1.23. While there are no Go 1.23-specific features used, upgrading the Go version requires:

  • Updating go 1.20 to at least go 1.21 in go.mod
  • Testing compatibility with the edwards25519 dependency (v1.1.0)
  • Verifying the fuzzing tests (currently requiring go1.18+)

Please update go.mod and verify the changes before merging.

🔗 Analysis chain

LGTM! Verify Go 1.23 compatibility.

The Go version updates look good:

  • Go 1.23 is now the primary version
  • Maintains support for Go 1.22 and 1.21
  • Removes Go 1.20 as planned

Let's verify compatibility with Go 1.23.


Let me gather more information about the build constraints and Go version requirements.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for any Go 1.23-specific syntax or features in the codebase
# that might cause compatibility issues

# Test 1: Look for any Go 1.23 specific features or syntax
echo "Checking for Go 1.23 specific features..."
rg -l 'go1\.23' 

# Test 2: Check go.mod for compatibility
echo "Checking go.mod for version constraints..."
if [ -f "go.mod" ]; then
    cat go.mod | grep -A 5 "^go "
fi

# Test 3: Look for any build constraints
echo "Checking for build constraints..."
rg -l '//\s*\+build\s+' 
rg -l '//go:build'

Length of output: 561


Script:

#!/bin/bash
# Check the specific build constraints and their version requirements
echo "Checking build constraint contents..."
rg "//go:build|//\s*\+build" -A 2

# Check for any version-specific code or dependencies
echo "Checking go.mod dependencies..."
cat go.mod

# Look for any potential compatibility issues in the code
echo "Checking for version-sensitive features..."
rg "(?i)go1\.[0-9]{2}" --type go

Length of output: 1501

'1.21',
'1.20',
]
mysql = [
'9.0',
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ A MySQL-Driver for Go's [database/sql](https://golang.org/pkg/database/sql/) pac

## Requirements

* Go 1.20 or higher. We aim to support the 3 latest versions of Go.
* Go 1.21 or higher. We aim to support the 3 latest versions of Go.
* MySQL (5.7+) and MariaDB (10.5+) are supported.
* [TiDB](https://github.com/pingcap/tidb) is supported by PingCAP.
* Do not ask questions about TiDB in our issue tracker or forum.
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module github.com/go-sql-driver/mysql

go 1.20
go 1.21

require filippo.io/edwards25519 v1.1.0
Loading