Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: vendor genqlient CLI #72

Merged
merged 1 commit into from
Nov 13, 2023
Merged

deps: vendor genqlient CLI #72

merged 1 commit into from
Nov 13, 2023

Conversation

bendrucker
Copy link
Contributor

Fixes unexpected go.sum diffs by vendoring genqlient's top level package, which provides its CLI. Previously, only the underlying Go package (github.com/Khan/genqlient/graphql) was actually import-ed in a Go file, so the CLI-providing package didn't get considered for go.sum. By including -mod=mod, we had explicitly directed Go to not try to load this package from the vendor/ dir (which would fail) and instead use the normal implicit module downloading. When this happened, Go would record downloaded dependencies in go.sum.

In dependency update PRs like #70, this caused unexpected diffs:

diff --git a/go.sum b/go.sum
index f849e87..a66a6ce 100644
--- a/go.sum
+++ b/go.sum
@@ -14,6 +14,12 @@ github.com/acomagu/bufpipe v1.0.4 h1:e3H4WUzM3npvo5uv95QuJM3cQspFNtFBzvJ2oNjKIDQ
 github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo=
 github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558=
 github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM=
+github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8=
+github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo=
+github.com/alexflint/go-arg v1.4.2 h1:lDWZAXxpAnZUq4qwb86p/3rIJJ2Li81EoMbTMujhVa0=
+github.com/alexflint/go-arg v1.4.2/go.mod h1:9iRbDxne7LcR/GSvEr7ma++GLpdIU1zrghf2y2768kM=
+github.com/alexflint/go-scalar v1.0.0 h1:NGupf1XV/Xb04wXskDFzS0KWOLH632W/EO4fAFi+A70=
+github.com/alexflint/go-scalar v1.0.0/go.mod h1:GpHzbCOZXEKMEcygYQ5n/aa4Aq84zbxjy3MxYW0gjYw=
 github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xN
gfBlViaCIJKLlCJ6/fmUseuG0wVQ=
 github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsF
o29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8=
 github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJ
EynmyUenKwP++x/+DdGV/Ec=

@bendrucker bendrucker requested a review from jta November 13, 2023 22:06
@bendrucker bendrucker enabled auto-merge (squash) November 13, 2023 22:06
@bendrucker bendrucker merged commit 43df483 into master Nov 13, 2023
5 checks passed
@bendrucker bendrucker deleted the genqlient-mod-vendor branch November 13, 2023 22:15
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