File: AppleBranchingScheme.md

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (102 lines) | stat: -rw-r--r-- 5,410 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# Apple's branching scheme for llvm-project

This document explains the various important branches in
[apple/llvm-project](https://github.com/apple/llvm-project),
how they relate to one another, and how they correspond to branches in the
[apple/swift](https://github.com/apple/swift) repository.

These are the most important branches to know about:

- [next](https://github.com/apple/llvm-project/tree/next)
  is aligned with Swift's
  [next](https://github.com/apple/swift/tree/next) branch.
- The current `stable` branch (check
  [update-checkout-config.json](https://github.com/apple/swift/blob/main/utils/update_checkout/update-checkout-config.json)
  for up-to-date info) is aligned with Swift's
  [main](https://github.com/apple/swift/tree/main) branch.
- `swift/*` branches are aligned with the corresponding Swift branch without
  the `swift/` prefix.

## Upstream branches

The `llvm.org/*` branches are forwarded, unchanged, from
[github.com/llvm/llvm-project](https://github.com/llvm/llvm-project).  These
are read-only, exact copies of the upstream LLVM project's branches.  They are
forwarded here as a convenience for easy reference, to avoid the need for extra
remotes.

- [llvm.org/main](https://github.com/apple/llvm-project/tree/llvm.org/main)
  is the most important branch here, matching the LLVM project's
  [main](https://github.com/llvm/llvm-project/tree/main) branch.

## Downstream branches

Downstream branches contain changes on top of what is in the LLVM project.
This includes some patches that have not yet been upstreamed to the LLVM
project, including some special support for Swift.

We are actively working on either upstreaming or reverting many of those
differences. The goal is to fully eliminate all *non-Swift* differences between
`next` and `llvm.org/main`.

Any LLVM development that does not depend on the Swift repository should happen
upstream. The only changes that are allowed to be submitted without going
through upstream LLVM are those that are either directly related to upstreaming
content or that are needed because of the existing differences (e.g., resolving
merge conflicts or fixing build errors).

- [next](https://github.com/apple/llvm-project/tree/next) is
  downstream of
  [llvm.org/main](https://github.com/apple/llvm-project/tree/llvm.org/main).
  There is a gated automerger that does testing before merging in.  Most
  changes to this branch should be redirected to <https://reviews.llvm.org/>
  (see also <http://llvm.org/docs/Contributing.html>).  Changes made to a
  stabilization branch are cherry-picked here.
- `stable/*`: These branches are periodic stabilization branches, where
  fixes are made or manually cherry-picked from `llvm.org/main`.
- `swift/release/*`: These are Swift release branches, where fixed are cherry-
  picked from a stabilization branch during release convergence.

## Historical trivia

### Mappings to branches from before the monorepo transition

Before the LLVM project's monorepo transition, Apple maintained downstream
forks of various split repositories.  Here is a mapping from a few of the new
branches in the llvm-project monorepo to their original split repositories.

- [apple/main](https://github.com/apple/llvm-project/tree/apple/main) was
  generated from the `upstream-with-swift` branches in
  [swift-clang](https://github.com/apple/swift-clang/),
  [swift-llvm](https://github.com/apple/swift-llvm/),
  [swift-compiler-rt](https://github.com/apple/swift-compiler-rt/),
  [swift-clang-tools-extra](https://github.com/apple/swift-clang-tools-extra/),
  and [swift-libcxx](https://github.com/apple/swift-libcxx/), with the notable
  **exclusion** of [swift-lldb](https://github.com/apple/swift-lldb/),
- [swift/next](https://github.com/apple/llvm-project/tree/swift/next)
  was generated from the `upstream-with-swift` branch in
  [swift-lldb](https://github.com/apple/swift-lldb/), interleaved with merges
  from [apple/main](https://github.com/apple/llvm-project/tree/apple/main).
- [apple/stable/20190104](https://github.com/apple/llvm-project/tree/apple/stable/20190104)
  was generated from the `swift-5.1-branch` branches in
  [swift-clang](https://github.com/apple/swift-clang/),
  [swift-llvm](https://github.com/apple/swift-llvm/),
  [swift-compiler-rt](https://github.com/apple/swift-compiler-rt/),
  [swift-clang-tools-extra](https://github.com/apple/swift-clang-tools-extra/),
  and [swift-libcxx](https://github.com/apple/swift-libcxx/), with the notable
  **exclusion** of [swift-lldb](https://github.com/apple/swift-lldb/),
- [swift/swift-5.1-branch](https://github.com/apple/llvm-project/tree/swift/swift-5.1-branch)
  was generated from the `swift-5.1-branch` branch in
  [swift-lldb](https://github.com/apple/swift-lldb/), interleaved with merges
  from
  [apple/stable/20190104](https://github.com/apple/llvm-project/tree/apple/stable/20190104).
- [swift/main](https://github.com/apple/llvm-project/tree/swift/main) was
  generated from the `stable` branch from all six split repos.

### Branching scheme prior to July 2021 change

Prior to July 2021, the `apple:llvm-project` repository maintained two sets
of downstream branches: one set that did not include any content that _depended
on_ Swift, and another set that included all downstream changes.  See
[this forum thread](https://forums.swift.org/t/simplifying-the-apple-llvm-project-branches/50287)
explaining the change.