gopasspw / git-credential-gopass

Gopass git-credentials helper
MIT License
49 stars 9 forks source link

Add toolchain line in go.mod #72

Closed ehaupt closed 7 months ago

ehaupt commented 7 months ago

I ran into an issue updating the FreeBSD port of git-credential-gopass to 1.15.12, related to Go 1.22's new way of handling the go.mod file for reproducibility. It now requires a toolchain line whenever it updates the go.mod file, as detailed here: https://go.dev/ref/mod#go-mod-file-toolchain.

Could you add this toolchain line to the project's go.mod? It would help avoid the 'no fetch' errors and make maintaining ports smoother.

dominikschulz commented 7 months ago

Sure, we can do that. But you could also send a PR. That might be faster.

dominikschulz commented 7 months ago

I have just tried this. go mod tidy removes the toolchain line if it matches the required Go version.

ehaupt commented 7 months ago

I suspect that 88d11d2b1b49f00b7fba9a917cf90f7ea14c9d1b solved the issue by setting the correct go minor version (1.22.0 vs 1.22). I've patched the FreeBSD port to manually fetch the fixed go.mod version. I guess with the next tagged release we'll see.