Skip to content

Commit 2e9b6b8

Browse files
authored
Merge pull request swiftlang#27859 from apple/shahmishal/update-branch-info
[Doc] Update the Branches doc with LLVM Project info
2 parents acfaa91 + ce62b92 commit 2e9b6b8

File tree

1 file changed

+23
-37
lines changed

1 file changed

+23
-37
lines changed

docs/Branches.md

Lines changed: 23 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -2,51 +2,45 @@
22

33
## The Development Branches
44

5-
| Swift | LLVM* | LLDB
6-
| ------ | ------ | ------
7-
| master | stable | stable
5+
| Swift | LLVM Project
6+
| ------ | ------------
7+
| master | swift/master
88

99
`master` is the place for active development on Swift. If you're just working on Swift, that's where you'll spend most of your time.
1010

11-
LLVM repos automatically merge changes from the latest release branch (see below) into `stable`. This generally means `stable` is just an alias for the latest release branch. If you want to do Swift-related development on LLVM projects, see "The Upstream Branches" below.
11+
LLVM Project repo automatically merge changes from the latest release branch (see below) into `swift/master`. This generally means `swift/master` is just an alias for the latest release branch. If you want to do Swift-related development on LLVM projects, see "The Upstream Branches" below.
1212

13-
LLDB is a bit more complicated. Because it's an [LLVM project][lldb] originally, it follows the LLVM branch names. However, it also contains extra support for Swift, and so it depends on being in sync with Swift as well. Work on LLDB is usually paired with work on Swift, so following Swift's branch is the way to go.
13+
To switch from one set of branches to another, you can use `utils/update-checkout` in the Swift repository with the `--scheme` option. You can use any of the branch names as the argument to `--scheme`: in this case, either `master` or `swift/master`.
1414

15-
To switch from one set of branches to another, you can use `utils/update-checkout` in the Swift repository with the `--scheme` option. You can use any of the branch names as the argument to `--scheme`: in this case, either `master` or `stable`.
16-
17-
\* "LLVM" refers to several repositories from the LLVM project that do *not* depend on Swift: LLVM, Clang, and compiler-rt. LLDB is different because it imports some of Swift's own headers and thus depends on Swift.
18-
19-
[release manager]: https://swift.org/blog/swift-4-0-release-process/
15+
[release manager]: https://swift.org/blog/5-2-release-process/
2016
[lldb]: http://lldb.llvm.org
2117

2218

2319
## The Release Branches
2420

25-
| Swift | LLVM* | LLDB
26-
| ---------------- | ---------------- | ----------------
27-
| swift-x.y-branch | swift-x.y-branch | swift-x.y-branch
21+
| Swift | LLVM Project
22+
| ---------------- | ----------------------
23+
| swift-x.y-branch | swift/swift-x.y-branch
2824

2925
At some point before a release, a *release branch* will be created in every repository with a name like `swift-4.0-branch`. (The actual number is chosen by Apple.) After the branch has been created, commits must make it to this branch to make it into the release. In some cases, the [release manager][] for the branch will decide to merge in all additional changes from `master`; otherwise, cherry-picking changes and making a new pull request is the way to go. If there are any "patch" releases (e.g. Swift 4.0.1), they will also come from this branch.
3026

31-
Note that these branches come not from the "development" branches (above), but the "upstream" branches (below). This is because they need to contain the latest changes not just from Swift, but from the LLVM projects (LLVM, Clang, compiler-rt, and LLDB) as well. For some releases, the release branch for the LLVM projects will be timed to coincide with the corresponding llvm.org release branch.
27+
Note that these branches come not from the "development" branches (above), but the "upstream" branches (below). This is because they need to contain the latest changes not just from Swift, but from the LLVM project as well. For some releases, the release branch for the LLVM project will be timed to coincide with the corresponding llvm.org release branch.
3228

3329

3430
## The Upstream Branches
3531

36-
| Swift | LLVM* | LLDB
37-
| ----------- | ------------------- | -------------------
38-
| master-next | upstream-with-swift | upstream-with-swift
32+
| Swift | LLVM Project
33+
| ----------- | -----------------
34+
| master-next | swift/master-next
3935

40-
`upstream-with-swift` is a branch for LLVM that includes all changes necessary to support Swift. Changes from llvm.org's master branch are automatically merged in. Why isn't this just `stable`? Well, because LLVM changes *very* rapidly, and that wouldn't be very stable. However, we do want to make sure the Swift stuff keeps working.
36+
`swift/master-next` is a branch for LLVM that includes all changes necessary to support Swift. Changes from llvm.org's master branch are automatically merged in. Why isn't this just `swift/master`? Well, because LLVM changes *very* rapidly, and that wouldn't be very stable. However, we do want to make sure the Swift stuff keeps working.
4137

42-
If you are making changes to LLVM to support Swift, you'll probably need to work on them in `stable` to test them against Swift itself, but they should be committed to `upstream-with-swift`, and cherry-picked to the current release branch (`swift-x.y-branch`) if needed. Remember, the release branches are automerged into `stable` on a regular basis.
38+
If you are making changes to LLVM to support Swift, you'll probably need to work on them in `swift/master` to test them against Swift itself, but they should be committed to `swift/master-next`, and cherry-picked to the current release branch (`swift/swift-x.y-branch`) if needed. Remember, the release branches are automerged into `swift/master` on a regular basis.
4339

44-
(If you're making changes to LLVM or LLDB that *aren't* about Swift, they should generally be made on llvm.org instead, then cherry-picked to the active release branch or `stable`.)
40+
(If you're making changes to LLVM Project that *aren't* about Swift, they should generally be made on llvm.org instead, then cherry-picked to the active release branch or `swift/master`.)
4541

4642
`master-next` is an effort to keep Swift building with the latest LLVM changes. Ideally when LLVM changes, no Swift updates are needed, but that isn't always the case. In these situations, any adjustments can go into Swift's `master-next` branch. Changes from Swift's `master` are automatically merged into `master-next` as well.
4743

48-
LLDB's `upstream-with-swift` has *both* aspects: changes are automatically merged in from `stable` *and* from llvm.org's master branch. Again, ideally there are no changes necessary here, but in practice LLDB may need updates to continue building against LLVM's `upstream-with-swift` and Swift's `master-next`.
49-
5044

5145
# Reference
5246

@@ -56,17 +50,15 @@ LLDB's `upstream-with-swift` has *both* aspects: changes are automatically merge
5650
swift/utils/update-checkout --scheme [branch]
5751
```
5852

59-
You can use any of the branch names as the argument to `--scheme`, such as `master` or `stable`. See `update-checkout --help` for more options.
53+
You can use any of the branch names as the argument to `--scheme`, such as `master` or `swift/master`. See `update-checkout --help` for more options.
6054

6155
## Committing
6256

6357
- Swift: new commits go to `master`
6458

65-
- LLVM/Clang/compiler-rt: new commits go to `upstream-with-swift`
59+
- LLVM Project: new commits go to `swift/master-next`
6660

67-
- LLDB: new commits go to `stable`
68-
69-
...then cherry-pick to the release branch (`swift-x.y-branch`) if necessary, following the appropriate release process. (Usually this means filling out a standard template, finding someone to review your code if that hasn't already happened, and getting approval from that repo's *release manager.)*
61+
...then cherry-pick to the release branch (`swift/swift-x.y-branch`) if necessary, following the appropriate release process. (Usually this means filling out a standard template, finding someone to review your code if that hasn't already happened, and getting approval from that repo's *release manager.)*
7062

7163
## Automerging
7264

@@ -75,13 +67,7 @@ Some branches are *automerged* into other branches, to keep them in sync. This i
7567
### Swift
7668
- `master` is automerged into `master-next`
7769

78-
### LLVM/Clang/compiler-rt
79-
- `swift-x.y-branch` (the *latest* release branch) is automerged into `stable`
80-
- llvm.org's `master` is automerged into `upstream-with-swift`
81-
- llvm.org's release branch *may* be automerged into `swift-x.y-branch`, if they are in sync
82-
83-
### LLDB
84-
- `swift-x.y-branch` (the *latest* release branch) is automerged into `stable`
85-
- `stable` is automerged into `upstream-with-swift`
86-
- llvm.org's `master` is *also* automerged into `upstream-with-swift`
87-
- llvm.org's release branch *may* be automerged into `swift-x.y-branch`, if they are in sync
70+
### LLVM Project
71+
- `swift/swift-x.y-branch` (the *latest* release branch) is automerged into `swift/master`
72+
- llvm.org's `master` is automerged into `swift/master-next`
73+
- llvm.org's release branch *may* be automerged into `swift/swift-x.y-branch`, if they are in sync

0 commit comments

Comments
 (0)