From 6b14a96261e9e444cf0c7969d5e27180d23405eb Mon Sep 17 00:00:00 2001 From: Adam French Date: Wed, 14 Oct 2026 22:44:46 +0100 Subject: [PATCH] Track gqlgen as a Go tool so make generate runs go run needed gqlgen's CLI dependencies in go.sum, and go mod tidy drops them because nothing in the module imports them. A tool directive records them, and go tool runs the pinned version. Co-Authored-By: Claude Opus 5.5 --- Makefile | 2 +- go.mod | 3 +++ go.sum | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6adb9e1..9730c3a 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ check-web: # Rewrites internal/graph/generated.go and internal/graph/model/models_gen.go # from internal/graph/schema/*.graphql. Resolver bodies are preserved. generate: - go run github.com/99designs/gqlgen generate + go tool gqlgen generate dev: docker compose up --build diff --git a/go.mod b/go.mod index c44ee83..eac4035 100644 --- a/go.mod +++ b/go.mod @@ -55,6 +55,7 @@ require ( github.com/tidwall/sjson v1.2.5 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/ugorji/go/codec v1.3.0 // indirect + github.com/urfave/cli/v3 v3.11.0 // indirect go.uber.org/mock v0.5.0 // indirect go.yaml.in/yaml/v4 v4.0.0-rc.2 // indirect golang.org/x/arch v0.20.0 // indirect @@ -67,3 +68,5 @@ require ( golang.org/x/tools v0.49.0 // indirect google.golang.org/protobuf v1.36.12 // indirect ) + +tool github.com/99designs/gqlgen diff --git a/go.sum b/go.sum index 7c50fe4..151c9a9 100644 --- a/go.sum +++ b/go.sum @@ -115,6 +115,8 @@ github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= github.com/ugorji/go/codec v1.3.0 h1:Qd2W2sQawAfG8XSvzwhBeoGq71zXOC/Q1E9y/wUcsUA= github.com/ugorji/go/codec v1.3.0/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4= +github.com/urfave/cli/v3 v3.11.0 h1:P/euJp99kb9p0tlVY+iYTLYYTAQlfl0hR2gUO1Img1Q= +github.com/urfave/cli/v3 v3.11.0/go.mod h1:ysVLtOEmg2tOy6PknnYVhDoouyC/6N42TMeoMzskhso= github.com/vektah/gqlparser/v2 v2.5.37 h1:jbb1Ilv+xBklV6653tKb4oVUupPNTLb5LmrnBKVI12Y= github.com/vektah/gqlparser/v2 v2.5.37/go.mod h1:9O4Ox6Ngd3Y12bMD3w6i3CRQXh8W1oC1q0m6olCymDM= go.uber.org/mock v0.5.0 h1:KAMbZvZPyBPWgD14IrIQ38QCyjwpvVVV6K/bHl1IwQU=