|
| 1 | +Platform Support Policy |
| 2 | +======================= |
| 3 | + |
| 4 | +Git has a history of providing broad "support" for exotic platforms and older |
| 5 | +platforms, without an explicit commitment. This support becomes easier to |
| 6 | +maintain (and possible to commit to) when Git developers are provided with |
| 7 | +adequate tooling to test for compatibility. Various levels of tooling will |
| 8 | +allow us to make more solid commitments around Git's compatibility with your |
| 9 | +platform. |
| 10 | + |
| 11 | +Compatible by next release |
| 12 | +-------------------------- |
| 13 | + |
| 14 | +To increase probability that compatibility issues introduced in a release |
| 15 | +will be fixed in a later release: |
| 16 | + |
| 17 | +* You should send a bug report as soon as you notice the breakage on your |
| 18 | +platform. The sooner you notice, the better; watching `seen` means you can |
| 19 | +notice problems before they are considered "done with review"; whereas watching |
| 20 | +`master` means the stable branch could break for your platform, but you have a |
| 21 | +decent chance of avoiding a tagged release breaking you. See "The Policy" in the |
| 22 | +link:../howto/maintain-git.txt[maintainer's guide] for an overview of which |
| 23 | +branches are used in git.git, and how. |
| 24 | +* The bug report should include information about what platform you are using. |
| 25 | +* You should also use linkgit:git-bisect[1] and determine which commit |
| 26 | +introduced the breakage. |
| 27 | +* Please include any information you have about the nature of the breakage: is |
| 28 | +it a memory alignment issue? Is an underlying library missing or broken for |
| 29 | +your platform? Is there some quirk about your platform which means typical |
| 30 | +practices (like malloc) behave strangely? |
| 31 | +* Once we begin to fix the issue, please work closely with the contributor |
| 32 | +working on it to test the proposed fix against your platform. |
| 33 | + |
| 34 | +Example: NonStop |
| 35 | +https://lore.kernel.org/git/01bd01da681a$b8d70a70$2a851f50$@nexbridge.com/[reports |
| 36 | +problems] when they're noticed. |
| 37 | + |
| 38 | +Compatible on `master` and point releases |
| 39 | +----------------------------------------- |
| 40 | + |
| 41 | +To guarantee that `master` and all point releases work for your platform the |
| 42 | +first time: |
| 43 | + |
| 44 | +* You should run nightly tests against the `next` branch and publish breakage |
| 45 | +reports to the mailing list immediately when they happen. |
| 46 | +** You may want to ask to join the mailto:git-security@googlegroups.com[security |
| 47 | +mailing list] in order to run tests against the fixes proposed there, too. |
| 48 | +* It may make sense to automate these; if you do, make sure they are not noisy |
| 49 | +(you don't need to send a report when everything works, only when something |
| 50 | +breaks). |
| 51 | +* Breakage reports should be actionable - include clear error messages that can |
| 52 | +help developers who may not have access to test directly on your platform. |
| 53 | +* You should use git-bisect and determine which commit introduced the breakage; |
| 54 | +if you can't do this with automation, you should do this yourself manually as |
| 55 | +soon as you notice a breakage report was sent. |
| 56 | +* You should either: |
| 57 | +** Provide VM access on-demand to a trusted developer working to fix the issue, |
| 58 | +so they can test their fix, OR |
| 59 | +** Work closely with the developer fixing the issue; the turnaround to check |
| 60 | +that their proposed fix works for your platform should be fast enough that it |
| 61 | +doesn't hinder the developer working on that fix. Slow testing turnarounds may |
| 62 | +cause the fix to miss the next release, or the developer may lose interest in |
| 63 | +working on the fix at all. |
| 64 | + |
| 65 | +Example: |
| 66 | +https://lore.kernel.org/git/CAHd-oW6X4cwD_yLNFONPnXXUAFPxgDoccv2SOdpeLrqmHCJB4Q@mail.gmail.com/[AIX] |
| 67 | +provides a build farm and runs tests against release candidates. |
| 68 | + |
| 69 | +Compatible on `next` |
| 70 | +-------------------- |
| 71 | + |
| 72 | +To guarantee that `next` will work for your platform, avoiding reactive |
| 73 | +debugging and fixing: |
| 74 | + |
| 75 | +* You should add a runner for your platform to the GitHub Actions CI suite. |
| 76 | +This suite is run when any Git developer proposes a new patch, and having a |
| 77 | +runner for your platform/configuration means every developer will know if they |
| 78 | +break you, immediately. |
| 79 | +** If adding it to GitHub Actions is infeasible (due to architecture constraints |
| 80 | +or for performance reasons), any other method which runs as automatically and |
| 81 | +quickly as possible works, too. For example, a service which snoops on the |
| 82 | +mailing list and automatically runs tests on new [PATCH] emails, replying to the |
| 83 | +author with the results, would also be within the spirit of this requirement. |
| 84 | +* If you rely on Git avoiding a specific pattern that doesn't work well with |
| 85 | +your platform (like a certain malloc pattern), raise it on the mailing list. |
| 86 | +There are a few ways to avoid these breakages, so we'll work case-by-case to |
| 87 | +find a solution that doesn't unnecessarily constrain other platforms to keep |
| 88 | +compatibility with yours. |
| 89 | +* If you rely on some configuration or behavior, add a test for it. Untested |
| 90 | +behavior is subject to breakage at any time. |
| 91 | +** Clearly label these tests as necessary for platform compatibility. Add them |
| 92 | +to an isolated compatibility-related test suite, like a new t* file or unit test |
| 93 | +suite, so that they're easy to remove when compatibility is no longer required. |
| 94 | +If the specific compatibility need is gated behind an issue with another |
| 95 | +project, link to documentation of that issue (like a bug or email thread) to |
| 96 | +make it easier to tell when that compatibility need goes away. |
| 97 | +** Include a comment with an expiration date for these tests no more than 1 year |
| 98 | +from now. You can update the expiration date if your platform still needs that |
| 99 | +assurance down the road, but we need to know you still care about that |
| 100 | +compatibility case and are working to make it unnecessary. |
| 101 | + |
| 102 | +Example: We run our |
| 103 | +https://git.kernel.org/pub/scm/git/git.git/tree/.github/workflows/main.yml[CI |
| 104 | +suite] on Windows, Ubuntu, Mac, and others. |
| 105 | + |
| 106 | +Getting help writing platform support patches |
| 107 | +--------------------------------------------- |
| 108 | + |
| 109 | +In general, when sending patches to fix platform support problems, follow |
| 110 | +these guidelines to make sure the patch is reviewed with the appropriate level |
| 111 | +of urgency: |
| 112 | + |
| 113 | +* Clearly state in the commit message that you are fixing a platform breakage, |
| 114 | +and for which platform. |
| 115 | +* Use the CI and test suite to ensure that the fix for your platform doesn't |
| 116 | +break other platforms. |
| 117 | +* If possible, add a test ensuring this regression doesn't happen again. If |
| 118 | +it's not possible to add a test, explain why in the commit message. |
| 119 | + |
| 120 | +Minimum Requirements |
| 121 | +-------------------- |
| 122 | + |
| 123 | +Even if platform maintainers are willing to add tests or CI runners, we will |
| 124 | +not consider helping to support platforms that do not meet these minimum |
| 125 | +requirements: |
| 126 | + |
| 127 | +* Has C99 or C11 |
| 128 | +* Has dependencies which were released in the past 10 years |
| 129 | +* Has active security support (taking security releases of dependencies, etc) |
| 130 | + |
| 131 | +Platform Maintainers |
| 132 | +-------------------- |
| 133 | + |
| 134 | +If you maintain a platform, or Git for that platform, and intend to work with |
| 135 | +the Git project to ensure compatibility, please send a patch to add yourself to |
| 136 | +this list. |
| 137 | + |
| 138 | +NonStop: Randall S. Becker <rsbecker@nexbridge.com> |
0 commit comments