blob: 65d1151f4699040ab43e07df5929b72e6487be78 [file] [log] [blame] [view]
Andrew Gerrand5bc444d2014-12-10 11:35:11 +11001# Introduction
2
3This document is about the policy for adding a new port to the main Go repository. By port we mean an operating system + architecture combination, such as linux/386.
4
5The goal of this policy is to avoid the accumulation of incomplete or broken ports.
6
7# Requirements for a new port
8
9Before any code relating to a port can be added to the main Go repository, the following must all be done:
10
11 * At least one developer must be named (and agree) to maintain the port, by making required updates in a timely manner as architecture or operating system requirements change.
12
Brad Fitzpatrickd6f22ec2015-10-05 09:56:31 -070013 * A developer must be named (and agree) to maintain the builder, the machine trying each git revision and providing data for http://build.golang.org.
Andrew Gerrand5bc444d2014-12-10 11:35:11 +110014
15 * The builder must already be running (and failing, because the code is not yet in the main repository).
16
17 * All CLs necessary to run all.bash successfully must have been sent for review. Typically this will be a handful of CLs split by the part of the tree they change.
18
19Once those conditions are satisfied, the Go team can accept the port and begin to merge the CLs. Once the CLs are all submitted, all.bash must pass, so that the builder reports "ok" in the dashboard.
20
21Any port started during a release cycle must be finished (all.bash passing, builder reporting "ok") before the corresponding release freeze, or else the code will be removed at the freeze.
22
23Because having any port entails a certain maintenance burden on the entire Go development team, not just the port's maintainer, the Go team may refuse a port meeting the above criteria if the port is judged not to reach enough users. This exception is intended to be used rarely, mainly to avoid maintaining ports for toy or hobby operating systems or experimental hardware that is not widely available.
24
Rob Pikebb274842015-04-01 14:24:32 -070025# Other repositories
26
27Although it is not part of the core repository, the x/sys repository should add support for the new port before the release happens because it is the official place to add new system calls.
28
Andrew Gerrand5bc444d2014-12-10 11:35:11 +110029# First class ports
30
31Some ports are considered "first class". The distinction is mostly about releases and distribution.
32
33A first class port has these properties:
34
35 * Broken builds block releases
36 * All contributors are effectively responsible for these ports (You break it, you fix it, or find someone who can.)
37 * Official binaries are provided
38 * Requires Google's Go team to own the builder machine
39 * Installation is documented at http://golang.org/doc/install
40
41Graduating a port to "first class" is at the discretion of the Go team at Google.
42
Brad Fitzpatrick7b425932017-01-06 13:13:43 -080043The current first class ports are:
44
45* linux/amd64
46* linux/386
47* linux/arm
48* darwin/amd64
49* windows/amd64
50* windows/386
51
52We distribute binaries for other GOOS/GOARCH pairs (other "ports"), but they are not "first class" by this definition.
53
Andrew Gerrand5bc444d2014-12-10 11:35:11 +110054# Removing a port
55
56If a builder for a particular port starts failing, the code should be corrected as soon as possible; otherwise future regressions cannot be detected, and the amount of work required to bring the builder back to "ok" compounds.
57
58Ultimately the job of making the port work again falls to the developer maintaining the port, although simple cases (such as +build lines in new code) can and should be fixed by others.
59
60If a builder fails for more than two weeks, it is time to start looking for a more active maintainer for the port.
61
62If a builder fails for more than four weeks or is failing at the time of a release freeze, and a new maintainer cannot be found, the port will be removed from the tree.
63
64Due to backwards compatibility concerns, removing a formerly working port should be a last resort. Finding a new maintainer is always preferable.
65
Brad Fitzpatrick812affa2018-06-20 07:56:56 -070066# Getting started
67
68See https://groups.google.com/forum/#!topic/golang-dev/SRUK7yJVA0c for some discussion on how to go about writing a new port.
69
Andrew Gerrand5bc444d2014-12-10 11:35:11 +110070# Comments and Questions
71
72Comments or questions about the policy should be sent to golang-dev.