Subject: Re: bug#50493: Update go-build-system to use Go 1.17.

From: Leo Famulari <[email-masked]>
Date: Thu, 9 Sep 2021 18:37:37 -0400

On Thu, Sep 09, 2021 at 03:14:57PM -0700, Sarah Morgensen wrote:
> This is intended to be a tracking issue for updating go-build-system to
> use Go 1.17 by default.  The build system currently uses Go 1.14, which
> no longer receives security updates [0].

Thanks for putting this together.

> Here's what needs to be done:
> 
> 1. Address the aarch64 bug [1], either by verifying that it only happens
> on emulated systems, or by fixing it if not.

It looks like there was a patch for this issue:

https://github.com/golang/go/issues/20763#issuecomment-314627882

And it was apparently added to Go, but maybe it was not sufficient, did
not make it into a release, or we are seeing a different bug.

> 2. Make some much-needed improvements to go-build-system [2]:
> 
> * replace the *slow* phase 'remove-go-references with -trimpath option
> 
> * avoid building a directory union of Go inputs (and then copying it!)

Are these required to use 1.17? I agree they are important problems to
fix but we shouldn't let them block the upgrade.

> * add a "go-std-cache-for-build" package (hidden; name to be
> bikeshedded), which will be an implicit input in go-build-system (needed
> since we removed the pre-built standard library in go-1.17)

Okay. Feel free to choose the name. I think it's your shed.

> 3. Some/all Docker packages still require Go 1.14; make them use go-1.14
> explicitly.  Alternatively, update Docker (significant effort involved).

Okay.

> 4. Update or patch broken packages.  I've got patches for four so far:
> 
> go-github-com-urfave-cli
> go-github-com-urfave-cli-v2
> go-github-com-sevlyar-go-daemon
> go-github-com-keybase-go-ps
>
> I'll submit them as a separate patch and block this with it.  If anyone
> else would like to see if their favorite package works with Go 1.17, you
> can build it with:

Okay, great.
  
>   go build --with-input=[email-masked]=[email-masked] <package>

Syncthing builds! That's great.