Maybe modifications with newer go version in go-post-fetch required
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 23 Apr 2024 12:42:21 UTC
Dear all, I just had a nasty bug, that `go mod download` was rewriting the go.mod file and was adding modification to the go.mod file: > ❯ diff -u go.mod.orig go.mod > --- go.mod.orig 2024-04-21 20:01:29.098380000 +0300 > +++ go.mod 2024-04-21 21:01:03.081898000 +0300 > @@ -1,6 +1,8 @@ > module gitlab.com/gitlab-org/gitlab-shell/v14 > > -go 1.20 > +go 1.21 > + > +toolchain go1.22.2 > > require ( > github.com/charmbracelet/git-lfs-transfer > v0.1.1-0.20240402115927-f0b226fa61cc This causes an invalid checksum, if you execute `make makesum` for a go package and therefor a fetch on another computer or after you deleted the go.mod from distfiles. I saw this problem for devel/gitlab-shell and fixed the problem by copy the initial go.mod and restore it after `go mod download` was executed. Maybe this is a new behaviour with go 1.22 and also a modification is maybe here required: https://cgit.freebsd.org/ports/tree/Mk/Uses/go.mk#n188 The fix I did is here: https://cgit.freebsd.org/ports/commit/?id=30ee39816e4e27529f1f2421820962b961c5fc0e Gruß Matthias -- "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning." -- Rich Cook