Skip to content

Commit e851eba

Browse files
committed
Update README.md.
This adds Xcode 14.0 to the version mapping table, and also adds a blurb about `main` and future versions no longer needing to sync with a specific toolchain release due to the new `SwiftParser`.
1 parent be7aef8 commit e851eba

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

README.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,19 @@ invoked via an [API](#api-usage).
1313
> and the code is provided so that it can be tested on real-world code and
1414
> experiments can be made by modifying it.
1515
16-
## Matching swift-format to Your Swift Version
17-
18-
`swift-format` depends on [SwiftSyntax](https://github.com/apple/swift-syntax)
19-
and the standalone parsing library that is distributed as part of the Swift
20-
toolchain, so you should check out and build `swift-format` from the release
16+
## Matching swift-format to Your Swift Version (Swift 5.7 and earlier)
17+
18+
> NOTE: `swift-format` on the `main` branch now uses a version of
19+
> [SwiftSyntax](https://github.com/apple/swift-syntax) whose parser has been
20+
> rewritten in Swift and no longer has dependencies on libraries in the
21+
> Swift toolchain. This allows `swift-format` to be built, developed, and
22+
> run using any version of Swift that can compile it, decoupling it from
23+
> the version that supported a particular syntax.
24+
25+
`swift-format` versions 0.50700.0 and earlier depend on versions of
26+
[SwiftSyntax](https://github.com/apple/swift-syntax) that used a standalone
27+
parsing library distributed as part of the Swift toolchain. When using these
28+
versions, you should check out and build `swift-format` from the release
2129
tag or branch that is compatible with the version of Swift you are using.
2230

2331
The major and minor version components of `swift-format` and SwiftSyntax must
@@ -28,6 +36,7 @@ Swift toolchain that is installed and used to build and run the formatter:
2836
| Xcode Release | Swift Version | `swift-format` Branch / Tags |
2937
|:----------------|:-----------------------|:---------------------------------|
3038
|| Swift at `main` | `main` |
39+
| Xcode 14.0 | Swift 5.7 | `release/5.7` / `0.50700.x` |
3140
| Xcode 13.3 | Swift 5.6 | `release/5.6` / `0.50600.x` |
3241
| Xcode 13.0–13.2 | Swift 5.5 | `swift-5.5-branch` / `0.50500.x` |
3342
| Xcode 12.5 | Swift 5.4 | `swift-5.4-branch` / `0.50400.x` |
@@ -45,7 +54,7 @@ then once you have identified the version you need, you can check out the
4554
source and build it using the following commands:
4655

4756
```sh
48-
VERSION=0.50600.0 # replace this with the version you need
57+
VERSION=0.50700.0 # replace this with the version you need
4958
git clone https://github.com/apple/swift-format.git
5059
cd swift-format
5160
git checkout "tags/$VERSION"

0 commit comments

Comments
 (0)