Skip to content

chore(go,deps): bump to Go 1.26.1; update tooling; migrate sort to slices.SortFunc#91

Open
hyp3rd wants to merge 1 commit intomainfrom
chore/deps-updates-260313
Open

chore(go,deps): bump to Go 1.26.1; update tooling; migrate sort to slices.SortFunc#91
hyp3rd wants to merge 1 commit intomainfrom
chore/deps-updates-260313

Conversation

@hyp3rd
Copy link
Owner

@hyp3rd hyp3rd commented Mar 13, 2026

Toolchain

  • Go: 1.26.0 -> 1.26.1 (go.mod + test/pre-commit hooks + env)
  • golangci-lint: v2.10.1 -> v2.11.3 (pre-commit hook)
  • buf: v1.66.0 -> v1.66.1 (.project-settings.env)

Dependencies (go.mod/go.sum)

  • github.com/goccy/go-json: v0.10.5 -> v0.10.6
  • go.opentelemetry.io/otel{,/metric,/trace}: v1.40.0 -> v1.42.0
  • golang.org/x/{crypto,net,sys,text}: v0.48.0/0.51.0/0.41.0/0.34.0 -> v0.49.0/0.52.0/0.42.0/0.35.0

Code

  • Replace sort.Slice with slices.SortFunc for deterministic, typed comparators:
    • internal/cluster/ring.go
    • pkg/backend/dist_memory.go
    • pkg/backend/filters.go
    • merkle sorting helpers

Notes

  • No functional behavior changes expected; aligns code with Go 1.26 stdlib APIs and refreshes tooling.

…ices.SortFunc

Toolchain
- Go: 1.26.0 -> 1.26.1 (go.mod + test/pre-commit hooks + env)
- golangci-lint: v2.10.1 -> v2.11.3 (pre-commit hook)
- buf: v1.66.0 -> v1.66.1 (.project-settings.env)

Dependencies (go.mod/go.sum)
- github.com/goccy/go-json: v0.10.5 -> v0.10.6
- go.opentelemetry.io/otel{,/metric,/trace}: v1.40.0 -> v1.42.0
- golang.org/x/{crypto,net,sys,text}: v0.48.0/0.51.0/0.41.0/0.34.0 -> v0.49.0/0.52.0/0.42.0/0.35.0

Code
- Replace sort.Slice with slices.SortFunc for deterministic, typed comparators:
  - internal/cluster/ring.go
  - pkg/backend/dist_memory.go
  - pkg/backend/filters.go
  - merkle sorting helpers

Notes
- No functional behavior changes expected; aligns code with Go 1.26 stdlib APIs and refreshes tooling.
Copilot AI review requested due to automatic review settings March 13, 2026 14:03
Copy link
Contributor

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

Updates the repository’s Go toolchain/developer tooling versions and refreshes dependency pins, while modernizing in-code sorting to use slices.SortFunc comparators.

Changes:

  • Bump toolchain/tooling versions (Go, golangci-lint, buf) across go.mod, env, Makefile, and pre-commit hooks.
  • Update Go module dependencies (otel, go-json, golang.org/x/*) via go.mod/go.sum.
  • Replace several sort.Slice / sort.Sort usages with slices.SortFunc in backend and cluster code paths.

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
pkg/backend/filters.go Switch item sorting to slices.SortFunc with a typed comparator.
pkg/backend/dist_memory.go Sort Merkle entries with slices.SortFunc + strings.Compare; drop sort import.
internal/cluster/ring.go Sort virtual nodes with slices.SortFunc (keeps sort.Search for lookup).
go.mod Bumps Go version + core deps (otel/go-json/x/*).
go.sum Updates module hashes to match updated deps.
Makefile Updates pinned tool versions (Go, buf, golangci-lint).
.project-settings.env Updates pinned tool versions consumed by hooks/Makefile.
.pre-commit/unit-test-hook Updates default Go toolchain version used for tests.
.pre-commit/golangci-lint-hook Updates default golangci-lint version.
.golangci.yaml Updates configured Go version for lint runs.

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

You can also share your feedback on Copilot code review. Take the survey.

# Mainly related to generics support since go1.18.
# Default: use Go version from the go.mod file, fallback on the env var `GOVERSION`, fallback on 1.17
go: "1.26.0"
go: "1.26.1"
Comment on lines +98 to +102
slices.SortFunc(items, func(a, b *cache.Item) int {
switch {
case sorter.less(a, b):
return -1
case sorter.less(b, a):
module github.com/hyp3rd/hypercache

go 1.26.0
go 1.26.1
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.

2 participants