@@ -13,14 +13,25 @@ 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 (Swift 5.7 and earlier)
16+ ## Matching swift-format to Your Swift Version
1717
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.
18+ ### Swift 5.8 and later
19+
20+ As of Swift 5.8, swift-format depends on the version of
21+ [ SwiftSyntax] ( https://github.com/apple/swift-syntax ) whose parser has been
22+ rewritten in Swift and no longer has dependencies on libraries in the
23+ Swift toolchain.
24+
25+ This change allows ` swift-format ` to be built, developed, and run using
26+ any version of Swift that can compile it, decoupling it from the version
27+ that supported a particular syntax. However, earlier versions of swift-format
28+ will still not be able to recognize new syntax added in later versions of the
29+ language and parser.
30+
31+ Note also that the version numbering scheme has changed to match
32+ SwiftSyntax; the 5.8 release of swift-format is ` 508.0.0 ` , not ` 0.50800.0 ` .
33+
34+ ### Swift 5.7 and earlier
2435
2536` swift-format ` versions 0.50700.0 and earlier depend on versions of
2637[ SwiftSyntax] ( https://github.com/apple/swift-syntax ) that used a standalone
@@ -54,7 +65,7 @@ then once you have identified the version you need, you can check out the
5465source and build it using the following commands:
5566
5667``` sh
57- VERSION=0.50700 .0 # replace this with the version you need
68+ VERSION=508.0 .0 # replace this with the version you need
5869git clone https://github.com/apple/swift-format.git
5970cd swift-format
6071git checkout " tags/$VERSION "
0 commit comments