Update dependencies, CI actions and go to 1.26 - #361
Conversation
Dependencies updated with go get -u, tidy and vendor. The go directive
moves to 1.26.0 with both workflows set up to match, checkout, setup-go
and setup-python bumped to their current majors, and the golangci-lint
pin raised to v2.12.2.
The newer linter surfaces three findings, all fixed rather than
excluded: the script listing was passed to report as a format string
and is now a plain argument, with the matching escaping dropped from
prepScript; two backward loops over pathsToDelete use slices.Backward;
and go fix replaced reflect.Ptr with reflect.Pointer and interface{}
with any in the deepcopy package.
07971ab to
732eb32
Compare
umputun
left a comment
There was a problem hiding this comment.
lgtm, with one correction to the PR body and an answer on lib/pq.
the vendor shrink explanation is wrong: it's modernc.org/sqlite v1.44.0 -> v1.57.0, not modernc.org/libc. Measured across both trees, sqlite goes 152.3 -> 58.4 MiB, which is 98.5% of all deletions in the PR, while libc moves 67.0 -> 66.7 MiB and still carries its per-platform generated sources at ~4 MB each. The real mechanism is modernc.org/undup collapsing the per-target sqlite_*.go files into shared sqlite_g_*.go ones. Pls fix that sentence, it's the only explanation offered for the largest deletion here and it points a reviewer at the wrong module.
on lib/pq, keep v1.12.3, no need to pin back. The PG 14+ line is a testing/support policy, not an enforced gate: the driver never reads serverVersion, and connector.go still defaults both min and max protocol version to 3.0, so the startup packet is byte-identical to v1.10.9's. Our own SQL floor is ON CONFLICT at PG 9.5. I'll add a supported-range line to README myself.
one thing worth knowing rather than fixing: the escaping change is a narrow bug fix, not just a lint-driven refactor. prepScript prepends script: <dst> to the listing after the doubling loop runs, so a % in --temp or ssh_temp used to come out as %!1(NOVERB) in the verbose2 header line. The new test doesn't cover that path, it guards the half-revert where %s gets dropped from report while the escaping stays gone, which is the more likely regression anyway.
README's install section states go 1.16+ while go.mod requires 1.26.0. Surfaced reviewing #361; predates that PR, so deferred rather than fixed there.
Routine maintenance pass, no behaviour changes.
Dependencies. Updated with
go get -u ./..., thengo mod tidyandgo mod vendor. The vendored tree shrinks from 244.0 MiB to 150.4 MiB, andmodernc.org/sqlitev1.44.0 to v1.57.0 accounts for effectively all of it: that module alone goes from 152.3 MiB to 58.4 MiB, since its per-targetsqlite_*.gosources are now collapsed into sharedsqlite_g_*.gofiles.modernc.org/libcbarely moves, 67.0 MiB to 66.7 MiB.golang.org/x/expdrops out andgolang.org/x/toolsappears in its place as an indirect requirement ofmodernc.org/libc, neither of which is vendored.One update is worth a decision rather than a rubber stamp:
github.com/lib/pqgoes from v1.10.9 to v1.12.3, and v1.11.0 narrowed the supported server range to maintained PostgreSQL releases, meaning 14 and newer, where the old version claimed 8.4 and newer. The built-in secrets provider is the only user of it and the README does not name a minimum server version, so nothing here is broken, but if you would rather keep the wider range I will pinlib/pqback to v1.10.9 and leave the rest of the update as it is.Go version. The
godirective moves to 1.26.0 and both workflows now set up Go 1.26 to match.Actions.
actions/checkoutv6 to v7,actions/setup-gov6 to v7 andactions/setup-pythonv6 to v7, all current majors.Linter. The
golangci-lintpin moves from v2.11.1 to v2.12.2. The newer version surfaces three findings, all fixed rather than excluded:pkg/runner/runner.go:265passed the script listing toreportas the format string, which worked only becauseprepScriptdoubled every%in it first. The listing is now passed as a plain argument through"%s"and the escaping inprepScriptis gone; the printed output is the same, andTestProcess_RunLocalgained a case with%verbs in the script to keep it that way.pathsToDeleteinLocal.removeExtraDstFilesandRemote.Deleteare nowslices.Backward, with the same order and the same cancellation checks.go fix ./...replacedreflect.Ptrwithreflect.Pointerandinterface{}withanyinpkg/config/deepcopy.go test -race ./...andgolangci-lint runare green locally.