From 9f7d829aa584627218f68d581ed62d05dac945a4 Mon Sep 17 00:00:00 2001 From: Kristoffer Dalby Date: Tue, 25 Aug 2026 09:43:16 +0000 Subject: [PATCH] go.mod: adopt the require layout Go 1.27 tidy produces Go 1.27 collapses requires into one direct and one indirect block, so the modernc lockstep note has to live inside a block to survive tidy. -compat=1.27 is a no-op now that the go directive is 1.27. --- .goreleaser.yml | 2 +- flakehashes.json | 4 ++-- go.mod | 47 +++++++++++++++++++++++------------------------ 3 files changed, 26 insertions(+), 27 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 63a1b9a89..ea6ee6275 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -2,7 +2,7 @@ version: 2 before: hooks: - - go mod tidy -compat=1.27 + - go mod tidy - go mod vendor release: diff --git a/flakehashes.json b/flakehashes.json index 496ebd68b..f1fc9c570 100644 --- a/flakehashes.json +++ b/flakehashes.json @@ -1,6 +1,6 @@ { "vendor": { - "goModSum": "sha256-9hyJR6xdvbNGw2JHqfObB6V3LJUTPDEfppsFE7Eje2U=", - "sri": "sha256-4ZaF8fAArd7tvJeHvo02c4MRWrDRcEUxzi2Y0h8AFVc=" + "goModSum": "sha256-c5zqlgQKbVs9Y9FXHkdZh17FqyXPLh/j+XYQj/IPW8k=", + "sri": "sha256-zWcaRben+px9w6NcUPkYfR6DbBJhwdYsXcZ5cm95hmo=" } } diff --git a/go.mod b/go.mod index 895a747b0..c86f606fc 100644 --- a/go.mod +++ b/go.mod @@ -51,36 +51,30 @@ require ( gopkg.in/yaml.v3 v3.0.1 gorm.io/driver/postgres v1.6.0 gorm.io/gorm v1.31.1 + // NOTE: modernc sqlite has a fragile dependency + // chain and it is important that they are updated + // in lockstep to ensure that they do not break + // some architectures and similar at runtime: + // https://github.com/juanfont/headscale/issues/2188 + // + // Fragile libc dependency: + // https://pkg.go.dev/modernc.org/sqlite#hdr-Fragile_modernc_org_libc_dependency + // https://gitlab.com/cznic/sqlite/-/issues/177 + // + // To upgrade, determine the new SQLite version to + // be used, and consult the `go.mod` file: + // https://gitlab.com/cznic/sqlite/-/blob/master/go.mod + // to find + // the appropriate `libc` version, then upgrade them + // together, e.g: + // go get modernc.org/libc@v1.55.3 modernc.org/sqlite@v1.33.1 + modernc.org/sqlite v1.52.0 pgregory.net/rapid v1.3.0 tailscale.com v1.103.0-pre tailscale.com/client/tailscale/v2 v2.9.0 zombiezen.com/go/postgrestest v1.0.1 ) -// NOTE: modernc sqlite has a fragile dependency -// chain and it is important that they are updated -// in lockstep to ensure that they do not break -// some architectures and similar at runtime: -// https://github.com/juanfont/headscale/issues/2188 -// -// Fragile libc dependency: -// https://pkg.go.dev/modernc.org/sqlite#hdr-Fragile_modernc_org_libc_dependency -// https://gitlab.com/cznic/sqlite/-/issues/177 -// -// To upgrade, determine the new SQLite version to -// be used, and consult the `go.mod` file: -// https://gitlab.com/cznic/sqlite/-/blob/master/go.mod -// to find -// the appropriate `libc` version, then upgrade them -// together, e.g: -// go get modernc.org/libc@v1.55.3 modernc.org/sqlite@v1.33.1 -require ( - modernc.org/libc v1.72.3 // indirect - modernc.org/mathutil v1.7.1 // indirect - modernc.org/memory v1.11.0 // indirect - modernc.org/sqlite v1.52.0 -) - require ( atomicgo.dev/cursor v0.2.0 // indirect atomicgo.dev/keyboard v0.2.10 // indirect @@ -251,6 +245,11 @@ require ( // https://github.com/tailscale/tailscale/blob/main/go.mod gvisor.dev/gvisor v0.0.0-20260224225140-573d5e7127a8 // indirect k8s.io/client-go v0.34.0 // indirect + // NOTE: keep in lockstep with modernc.org/sqlite; see the + // upgrade note in the direct require block above. + modernc.org/libc v1.72.3 // indirect + modernc.org/mathutil v1.7.1 // indirect + modernc.org/memory v1.11.0 // indirect sigs.k8s.io/yaml v1.6.0 // indirect software.sslmate.com/src/go-pkcs12 v0.4.0 // indirect )