Subject: Re: bug#25752: go incremental builds broken

From: Simon Tournier <[email-masked]>
Date: Tue, 17 Oct 2023 00:44:46 +0200

Hi Go team,

I was reviewing the status of old bugs and I find bug#25752

    https://issues.guix.gnu.org/issue/25752

Since I am not a Go user, is it possible that Go team says if this bug
is still worth keeping open?

On Fri, 28 Oct 2022 at 10:22, zimoun <[email-masked]> wrote:
> On Thu, 27 Oct 2022 at 12:21, Maxime Devos <[email-masked]> wrote:
>
>> A reproducer was given in
>> <https://issues.guix.gnu.org/25752#0>:
>>
>> guix environment --ad-hoc go -- bash -c 'export t=$(mktemp -d); cd
>> $t && export GOPATH=$(pwd) GOBIN=$(pwd)/bin && go install cmd/go; cd
>> && rm -rf $t'
>
> $ guix shell -C go bash coreutils -- bash -c 'export t=$(mktemp -d); cd $t && export GOPATH=$(pwd) GOBIN=$(pwd)/bin && go install cmd/go; cd && echo $t'
> [...]
>
> # runtime/cgo
> cgo: C compiler "gcc" not found: exec: "gcc": executable file not found in $PATH
> /tmp/tmp.srzPbcMLCc
>
> $ guix shell -C go bash coreutils gcc-toolchain -- bash -c 'export t=$(mktemp -d); cd $t && export GOPATH=$(pwd) GOBIN=$(pwd)/bin && go install cmd/go; cd && echo $t'
> [...]
>
> go install cmd/go: copying /tmp/go-build1675975230/b001/exe/a.out: open /gnu/store/82adn4rx1h5fc7zms5g0ymwr8dk060nh-go-1.19.1/lib/go/bin/go: read-only file system
> /tmp/tmp.qOfxzeZDxH
>
> Well, as I am not a Go user, what is the expected result of the command?
>
>
> Efraim commented:
>
>         I actually spent a bit of time on this today/yesterday. I
>         modified the go-build-system to copy the pkg and src folders
>         from build to build (instead of just the src folders) and the
>         pkg folders were ignored.  Upstream documentation isn't clear
>         about when the pkg folder is used and when it is ignored.
>
>         <https://issues.guix.gnu.org/25752#7>

Well, as I previously mentioned, I do not know what is the expected
result of the reproduced. :-)

Cheers,
simon