Skip to content

Conversation

@neilotoole
Copy link
Owner

@neilotoole neilotoole commented Dec 27, 2025

For #504: Update Go version, library dependencies, and tooling to latest versions.

Summary

Maintenance PR to bring the codebase up to date with latest Go version, dependencies, and tooling.

Changes

Go Version

  • Updated to Go 1.25.5

Dependencies

  • Updated most library dependencies in go.mod to latest compatible versions
  • Updated go.sum with new checksums
  • Not updated: Dependencies marked BRITTLE in go.mod were intentionally left unchanged and will be updated in a future PR:
    • github.com/go-sql-driver/mysql v1.8.1
    • github.com/jackc/pgx/v5 v5.7.2
    • github.com/mattn/go-sqlite3 v1.14.24
    • github.com/microsoft/go-mssqldb v1.8.0
    • github.com/vbauerster/mpb/v8 v8.7.3

Tooling

golangci-lint

  • Upgraded golangci-lint to v2.7.2
  • Migrated .golangci.yml from v1 format to v2 format
    • Significant restructuring of configuration
    • Updated linter settings to match new schema
    • Reduced config from ~654 lines to ~411 lines

Build Tools Directory

  • Created tools/ directory with isolated Go modules for build tools:
    • tools/betteralign/ - struct field alignment checker
    • tools/gofumpt/ - stricter gofmt
    • tools/goimports-reviser/ - import organization
    • tools/golangci-lint/ - linter (isolated module)
    • tools/tparse/ - test output parser
  • Added tools/README.md documenting the tools setup

Docker Linting Script

  • Added run-golangci-lint-docker.sh for running golangci-lint in Docker
    • Useful for consistent linting across different environments/architectures

GitHub Actions

  • Updated action versions in workflows:
    • .github/workflows/codacy.yml
    • .github/workflows/codeql.yml
    • .github/workflows/dependency-review.yml
    • .github/workflows/docker-publish-ci.yml
    • .github/workflows/docker-publish-dispatch.yml
    • .github/workflows/main.yml (significant updates to linting steps)

Linting Fixes

Applied fixes for linter warnings across the codebase:

  • cli/ - Various linting fixes
  • drivers/mysql/metadata.go - Linting fixes
  • drivers/postgres/metadata.go - Linting fixes
  • drivers/sqlite3/grip.go - Linting fixes
  • drivers/sqlite3/metadata.go - Linting fixes
  • drivers/sqlserver/metadata.go - Linting fixes
  • libsq/ast/ - AST handling improvements
  • libsq/core/ - Core library fixes
  • libsq/driver/ - Driver fixes
  • libsq/files/internal/downloader/ - Downloader fixes
  • libsq/source/location/ - Location handling fixes
  • testh/tu/ - Test utility fixes

Test Data

  • Updated SQLite test databases:
    • drivers/sqlite3/testdata/sakila.db
    • drivers/sqlite3/testdata/sakila_fts5.db

Stats

  • Files changed: 55
  • Insertions: 2,154
  • Deletions: 879

Notes

  • The golangci-lint v2 migration required significant configuration changes
  • GitHub Actions may behave differently across architectures for linting (addressed with Docker script option)

@neilotoole neilotoole changed the title 504 - Version updates 2025-12. 504 - Version updates 2025-12 Dec 28, 2025
@neilotoole neilotoole self-assigned this Dec 28, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Go version, dependencies, and tooling to current versions, with a focus on migrating golangci-lint from v1 to v2 format, establishing an isolated tools directory structure, and applying associated linting fixes across the codebase.

Key Changes

  • Updated Go from 1.23.4 to 1.25.5
  • Upgraded golangci-lint to v2.7.2 with complete v2 configuration migration
  • Established tools/ directory pattern for build tools with isolated Go modules
  • Applied linting fixes for new golangci-lint v2 rules across the codebase

Reviewed changes

Copilot reviewed 46 out of 55 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
go.mod / go.sum Updated Go version to 1.25.5 and most dependencies; marked brittle deps for future updates
tools/*/go.mod / tools/*/go.sum Created isolated tool modules for betteralign, gofumpt, goimports-reviser, golangci-lint, and tparse
tools/README.md Documented tools directory structure and rationale
run-golangci-lint-docker.sh Added Docker-based linting script for cross-architecture consistency
.github/workflows/*.yml Updated action versions (checkout v6, setup-go v6, golangci-lint-action v9, etc.)
Makefile Updated tool invocations to use go tool -modfile pattern
cli/**/*.go Applied linting fixes: replaced deprecated ParseErrorsWhitelist, improved Sprint usage, simplified conditionals
libsq/**/*.go Applied linting fixes: replaced nolint directives, improved string building, simplified switch statements
drivers/*/metadata.go Converted if-else chains to switch statements for table type checking
testh/tu/*.go Added context to exec.Command calls, suppressed linter for intentional formatting

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

drluckyspin
drluckyspin previously approved these changes Dec 28, 2025
Copy link
Collaborator

@drluckyspin drluckyspin left a comment

Choose a reason for hiding this comment

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

LGTM!

neilotoole and others added 2 commits December 27, 2025 21:40
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
@neilotoole neilotoole marked this pull request as ready for review December 28, 2025 04:41
@neilotoole neilotoole changed the title 504 - Version updates 2025-12 Issue #504 - Version updates 2025-12 Dec 28, 2025
@neilotoole neilotoole requested a review from Copilot December 28, 2025 04:49
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 47 out of 56 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@neilotoole neilotoole merged commit 4182be3 into master Dec 28, 2025
18 checks passed
@neilotoole neilotoole deleted the 504-version-update branch December 28, 2025 05:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants