Skip to content

Upgrade to Go 1.26#926

Merged
merlimat merged 2 commits intooxia-db:mainfrom
merlimat:go-1.26
Mar 3, 2026
Merged

Upgrade to Go 1.26#926
merlimat merged 2 commits intooxia-db:mainfrom
merlimat:go-1.26

Conversation

@merlimat
Copy link
Copy Markdown
Collaborator

@merlimat merlimat commented Mar 3, 2026

Upgrade to Go 1.26

  • Bump go directive from 1.25 to 1.26 in go.work and all 5 module go.mod files
  • Update Dockerfile build stage from golang:1.25-alpine to golang:1.26-alpine
  • Upgrade cockroachdb/swiss to fix Go 1.26 runtime compatibility (old version used go:linkname for fastrand64/hashFn which broke in 1.26)
  • Refactor cmd/wal/perf to use sync.WaitGroup.Go() (new in Go 1.26) and extract functions to reduce cognitive complexity
  • Fix lint issues newly visible after successful compilation:
    • Add filepath.Clean for gosec G703 path traversal taint analysis
    • Add default cases to type switches for revive enforce-switch-style
    • Preallocate slices with proper capacity for prealloc linter
  • Update .golangci.yaml:
    • Exclude gosec G703 (taint-tracked config file paths)
    • Exclude gosec for maelstrom/ test harness
    • Exclude revive var-naming for stdlib-conflicting package names
    • Fix deprecated goconst ignore-strings ->

- Bump go directive from 1.25 to 1.26 in go.work and all 5 module go.mod files
- Update Dockerfile build stage from golang:1.25-alpine to golang:1.26-alpine
- Upgrade cockroachdb/swiss to fix Go 1.26 runtime compatibility
  (old version used go:linkname for fastrand64/hashFn which broke in 1.26)
- Refactor cmd/wal/perf to use sync.WaitGroup.Go() (new in Go 1.26)
  and extract functions to reduce cognitive complexity
- Fix lint issues newly visible after successful compilation:
  - Add filepath.Clean for gosec G703 path traversal taint analysis
  - Add default cases to type switches for revive enforce-switch-style
  - Preallocate slices with proper capacity for prealloc linter
- Update .golangci.yaml:
  - Exclude gosec G703 (taint-tracked config file paths)
  - Exclude gosec for maelstrom/ test harness
  - Exclude revive var-naming for stdlib-conflicting package names
  - Fix deprecated goconst ignore-strings -> ignore-string-values

Signed-off-by: Matteo Merli <mmerli@apache.org>
Signed-off-by: Matteo Merli <mmerli@apache.org>
@merlimat merlimat merged commit 1da3ef4 into oxia-db:main Mar 3, 2026
5 checks passed
@merlimat merlimat deleted the go-1.26 branch March 3, 2026 20:13
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.

1 participant