microsoft / go

The Microsoft build of the Go toolset
BSD 3-Clause "New" or "Revised" License
259 stars 22 forks source link

Use golang/build repo for build/packaging infrastructure #152

Open dagood opened 2 years ago

dagood commented 2 years ago

https://github.com/golang/build

This subrepository holds the source for various packages and tools that support Go's build system and the development of the Go programming language.

The golang/build repo has one active branch that is used to build/pack/release all active upstream versions of Go. It has a different balance of responsibility than we're used to in the .NET repos: golang/build creates tarballs, MSIs, etc., rather than implementing packaging inside golang/go.

If we can reuse golang/build, we may be able to be more sure we're keeping up to date with changes to:

We can also move a significant chunk of our own Microsoft-specific infrastructure to the new repo. This would reduce the amount of cherry-picks needed between our microsoft/go branches when we do bugfixes or add features that we want to apply to all branches.(See comment.)


The challenge is that a lot of the code in golang/build is tightly coupled to the build pool implementation. E.g. the tool that produces tar.gz files assumes it has a connection to a build machine using the agent implemented in golang/build, which uses a lot of GCE APIs. (Caveat: I haven't dug too deeply into whether we can try to swap out the agent implementation to make more parts work locally.)

We will likely need to use a fork model and make changes to make the golang/build repo usable in our context. Some areas are more coupled than others (MSIs are not very coupled!) so perhaps we can pick and choose.

Once we have a fork:

As an improvement, consider adding PR validation to the tooling repo that runs a build against each branch of Go. (Careful about making a dependency cycle. Maybe the dependency should float, and the check should be optional.)

dagood commented 2 years ago

I'm creating a repo microsoft/go-infra to store Microsoft-specific shared infra, unrelated to golang/build. I named it go-infra to leave room for a go-build repository if we want to forward with this plan in the future.